/* JK Constant Contact Popup - frontend styles */

.jk-ccp-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.jk-ccp-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--jk-ccp-overlay, rgba(0, 0, 0, 0.65));
}

.jk-ccp-modal {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    max-width: var(--jk-ccp-max-width, 760px);
    max-height: 90vh;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    color: var(--jk-ccp-text, #3d3d3d);
}

.jk-ccp-bg {
    position: absolute;
    inset: 0;
    background-image: var(--jk-ccp-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.jk-ccp-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    padding: 2rem 2.5rem 0;
    text-align: center;
    background: linear-gradient(
        to bottom,
        var(--jk-ccp-content-bg, rgba(255, 255, 255, 0.92)) 0%,
        var(--jk-ccp-content-bg, rgba(255, 255, 255, 0.92)) var(--jk-ccp-fade-start, 55%),
        var(--jk-ccp-content-end, rgba(255, 255, 255, 0.25)) 100%
    );
}

.jk-ccp-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    z-index: 10;
    background: transparent;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    color: var(--jk-ccp-text, #3d3d3d);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jk-ccp-close:hover,
.jk-ccp-close:focus {
    opacity: 0.7;
    outline: none;
}

.jk-ccp-pre-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--jk-ccp-text, #3d3d3d);
    text-transform: none;
    letter-spacing: 0.02em;
}

.jk-ccp-headline {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--jk-ccp-text, #3d3d3d);
}

.jk-ccp-subheading {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--jk-ccp-text, #3d3d3d);
    opacity: 0.85;
}

.jk-ccp-form {
    margin: 0 auto ;
    max-width: 520px;
}

.jk-ccp-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 10rem;
}

.jk-ccp-zip-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
}

.jk-ccp-zip-row .jk-ccp-input {
    flex: 1 1 auto;
    min-width: 0;
}

.jk-ccp-zip-row .jk-ccp-button {
    flex: 0 0 auto;
    align-self: stretch;
    white-space: nowrap;
}

.jk-ccp-button-wide {
    grid-column: 1 / -1;
    width: 100%;
}

.jk-ccp-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    background: #fff;
    color: #3d3d3d;
    font-size: 1rem;
    line-height: 1.3;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.jk-ccp-input:focus {
    border-color: var(--jk-ccp-btn, #c44536);
    box-shadow: 0 0 0 3px rgba(196, 69, 54, 0.15);
    outline: none;
}

.jk-ccp-input-wide {
    grid-column: 1 / -1;
}

.jk-ccp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.5rem;
    border: 0;
    border-radius: 3px;
    background-color: var(--jk-ccp-btn, #c44536);
    color: var(--jk-ccp-btn-text, #fff);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s;
}

.jk-ccp-button:hover,
.jk-ccp-button:focus {
    filter: brightness(1.1);
}

.jk-ccp-button:active {
    transform: translateY(1px);
}

.jk-ccp-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.jk-ccp-message {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    min-height: 1.4em;
}

.jk-ccp-message.is-success {
    color: #2a7a2a;
}

.jk-ccp-message.is-error {
    color: #c44536;
}

.jk-ccp-terms {
    margin: 1rem 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--jk-ccp-text, #3d3d3d);
}

.jk-ccp-disclaimer {
    margin: auto -2.5rem 0;
    padding: 1em 2.5rem;
    font-size: 1rem;
    font-weight:600;
    color: var(--jk-ccp-text, #3d3d3d);
    background: rgba(255, 255, 255, var(--jk-ccp-disclaimer-opacity, 0.65));
}

.jk-ccp-terms a {
    color: var(--jk-ccp-text, #3d3d3d);
    text-decoration: underline;
}

.jk-ccp-terms a:hover {
    text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
    .jk-ccp-modal {
        max-height: 92vh;
        min-height: 60vh;
    }

    .jk-ccp-content {
        padding: 1.5rem 1.25rem 0;
    }

    .jk-ccp-disclaimer {
        margin: auto -1.25rem 0;
        padding: 1em 1.25rem;
    }

    .jk-ccp-headline {
        font-size: 1.5rem;
    }

    .jk-ccp-fields {
        grid-template-columns: 1fr;
    }

    .jk-ccp-input-wide {
        grid-column: auto;
    }

    .jk-ccp-zip-row {
        flex-direction: column;
    }

    .jk-ccp-zip-row .jk-ccp-button,
    .jk-ccp-button {
        width: 100%;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .jk-ccp-popup {
        transition: none;
    }
}
