/* Offer Sign-Up Form Modal Styles */

.offer-signup-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.offer-signup-form-modal.show {
    display: block;
}

.offer-signup-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.offer-signup-form-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: offerSignupFormSlideIn 0.3s ease-out;
}

@keyframes offerSignupFormSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.offer-signup-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, var(--cerulean), #039b8b);
    color: white;
    border-radius: 15px 15px 0 0;
}

.offer-signup-form-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.offer-signup-form-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.offer-signup-form-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.offer-signup-form-content {
    padding: 30px;
}

.offer-signup-form-fields {
    margin-bottom: 25px;
}

.offer-signup-form-field {
    margin-bottom: 20px;
}

.offer-signup-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.offer-signup-form-field input {
    width: 100%;
    padding: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.offer-signup-form-field input:focus {
    outline: none;
    border-color: var(--cerulean);
    box-shadow: 0 0 0 3px rgba(3, 121, 155, 0.1);
}

.offer-signup-form-field input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.offer-signup-form-submit {
    text-align: center;
    margin-bottom: 20px;
}

.offer-signup-form-submit-btn {
    background: linear-gradient(135deg, var(--cerulean), #039b8b);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 200px;
}

.offer-signup-form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 121, 155, 0.3);
}

.offer-signup-form-submit-btn:active {
    transform: translateY(0);
}

.offer-signup-form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.offer-signup-form-messages {
    margin-top: 20px;
}

.offer-signup-form-success,
.offer-signup-form-error {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.offer-signup-form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.offer-signup-form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Inline container used when embedding the form in content (e.g., Hero) */
.offer-signup-inline {
    width: 100%;
    max-width: 560px;
    padding: 2rem 2rem 1rem 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: solid 1px #297a985c;
    border-radius: 20px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0px 0px 0px 7px #277799;
}

.offer-signup-inline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(
        320deg,
        rgba(188, 229, 234, 0.9) 0%,
        rgba(226, 252, 255, 0.9) 47%,
        rgba(188, 229, 234, 0.9) 100%
    );
    background-repeat: no-repeat, repeat;
    background-size: cover, auto;
    background-position: center, top left;
}
.offer-signup-inline:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('/wp-content/themes/ncdic/images/cardboard-texture-01.png');
    background-repeat: no-repeat, repeat;
    background-size: cover, auto;
    background-position: center, top left;
}

.offer-signup-inline .offer-signup-form-field label {
    display: none;
}

.offer-signup-inline .offer-signup-form-success {
    font-size: 1rem;
}

.offer-signup-form-title {
    font-size: 22px;
    font-weight: 700;
    color: #123;
    margin-bottom: 16px;
}

.home-hero:has(.offer-signup-inline) {
    height: 80vh;
}

.home-hero:has(.offer-signup-inline) .hero-text {
    margin-bottom: 0;
}

.home-hero:has(.offer-signup-inline) .hero-buttons {
    display: none;
}




/* Responsive Design */
@media (max-width: 768px) {
    .offer-signup-form-container {
        width: 95%;
        max-height: 95vh;
    }

    .offer-signup-form-header {
        padding: 20px 25px 15px;
    }

    .offer-signup-form-header h2 {
        font-size: 20px;
    }

    .offer-signup-form-content {
        padding: 25px;
    }

    .offer-signup-form-field input {
        padding: 12px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .offer-signup-form-submit-btn {
        padding: 12px 30px;
        font-size: 16px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .offer-signup-form-container {
        width: 98%;
        border-radius: 10px;
    }

    .offer-signup-form-header {
        padding: 15px 20px 10px;
        border-radius: 10px 10px 0 0;
    }

    .offer-signup-form-content {
        padding: 20px;
    }

    .offer-signup-form-header h2 {
        font-size: 18px;
    }
}

/* Loading State */
.offer-signup-form-submit-btn.loading {
    position: relative;
    color: transparent;
}

.offer-signup-form-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: offerSignupFormSpin 1s linear infinite;
}

@keyframes offerSignupFormSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
}

/* Ensure modal content doesn't cause scroll jumps */
.offer-signup-form-modal.show {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Prevent smooth scrolling for offer-signup links */
a[href="#offer-signup"] {
    scroll-behavior: auto !important;
}

/* Prevent anchor-based scrolling for offer-signup */
html {
    scroll-behavior: auto !important;
}