.advent-subscription-form {
    max-width: 100vw !important;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100%;
    min-height: 100vh;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    position: relative;
    left: 0;
    font-size: 85%;
}

.advent-sub-form h2 {
    font-size: 1.85rem;
}

.advent-subscribe-grid {
    display: flex;
    gap: 1rem;
    /* Stretch children to match the tallest column so image fills the form height */
    align-items: stretch;
    background: #f9f9f9;
    padding: 0;
    border-radius: 8px;
    height: 100%;
}

.advent-sub-image {
    flex: 0 0 50%;
    display: flex;
    /* Allow inner content to stretch vertically; use center for horizontal alignment */
    align-items: stretch;
    justify-content: center;
    width: 100%;
    /* height: 100%; */
    /* Allow the flex item to shrink below viewport height when parent is smaller */
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    flex: 1 1 50%;
}

.advent-sub-image img {
    width: 100%;
    height: 100%;
    /* Remove forced viewport min height so image fits parent height */
    min-height: 0;
    object-fit: cover;
    /* border-radius: 6px; */
    display: block;
}

.advent-sub-form {
    flex: 1 1 50%;
    padding: 2rem;
    /* min-height: 100vh; */
    align-content: center;
    align-items: center;
    max-width: 48rem;
}

.advent-sub-form h2 {
    margin-top: 0;
}

.advent-sub-description {
    margin-bottom: 1rem;
}

.advent-sub-form label {
    display: block;
    margin-bottom: 0.5rem;
    /* font-weight: bold; */
}

.advent-sub-form input[type="text"],
.advent-sub-form input[type="email"] {
    width: 100%;
    max-width: calc(50% - 1rem);
    padding: 0.5rem;
    margin-left: 0;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.advent-sub-form .required {
    color: red;
}

.advent-sub-form .button {
    background: #0073aa;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.advent-sub-form .button:hover {
    background: #005a87;
}

#subscription-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
}

#subscription-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#subscription-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 900px) {
    .advent-subscribe-grid {
        flex-direction: column;
    }

    .advent-sub-image {
        flex: none;
        width: 100%;
        height: auto;
        min-height: initial;
    }

    .advent-subscription-form {
        height: auto;
    }
}

@media (max-width: 500px) {
    .advent-sub-form input[type="text"],
    .advent-sub-form input[type="email"] {
        max-width: 100%;
    }
}