/**
 * MCP-ADS Theme - Offer Wall Modal
 *
 * Styles for the offer wall overlay, quiz flow, form capture,
 * reward screen, ad display, and all associated animations.
 */

/* ============================================================
   OVERLAY & MODAL SHELL
   ============================================================ */

.mcp-offerwall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 1rem;
    box-sizing: border-box;
}

.mcp-offerwall-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 92%;
    overflow: hidden;
    animation: mcp-slideUp .45s cubic-bezier(.22, .61, .36, 1) forwards;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, .28),
        0 8px 20px rgba(0, 0, 0, .12);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.mcp-offerwall-progress {
    height: 6px;
    background: #e5e7eb;
    overflow: hidden;
}

.mcp-offerwall-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #482d70, #6b4b9a);
    border-radius: 0 3px 3px 0;
    transition: width .4s ease;
    will-change: width;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */

.mcp-offerwall-content {
    padding: 2rem;
    text-align: center;
}

/* ============================================================
   LOADING STATE
   ============================================================ */

.mcp-offerwall-loading {
    padding: 2.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* ============================================================
   QUIZ QUESTIONS
   ============================================================ */

.mcp-ow-question {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: #1a1a1a;
    letter-spacing: -.3px;
    line-height: 1.3;
}

.mcp-ow-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mcp-ow-option {
    padding: .9rem 1.25rem;
    border: 2px solid #c4b5e0;
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color .2s ease,
                background-color .2s ease,
                transform .2s ease,
                box-shadow .2s ease;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
}

.mcp-ow-option:hover {
    border-color: #482d70;
    background: #f9f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(72, 45, 112, .15);
}

.mcp-ow-option:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(72, 45, 112, .12);
}

.mcp-ow-option:focus-visible {
    outline: 2px solid #482d70;
    outline-offset: 2px;
}

/* ============================================================
   FORM (lead capture)
   ============================================================ */

.mcp-ow-form {
    text-align: left;
}

.mcp-ow-field {
    margin-bottom: .85rem;
}

.mcp-ow-field label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: #333;
}

.mcp-ow-input {
    width: 100%;
    padding: .75rem .85rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    background: #fafafa;
    color: #1a1a1a;
    transition: border-color .2s ease,
                background-color .2s ease,
                box-shadow .2s ease;
}

.mcp-ow-input:focus {
    border-color: #482d70;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(72, 45, 112, .12);
}

.mcp-ow-input::placeholder {
    color: #999;
}

.mcp-ow-subtitle {
    font-size: .95rem;
    color: #555;
    margin: .25rem 0 1.25rem;
    line-height: 1.5;
}

.mcp-ow-submit {
    width: 100%;
    padding: .85rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: #15803d;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: .5rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: background-color .2s ease,
                transform .15s ease,
                box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(21, 128, 61, .25);
}

.mcp-ow-submit:hover {
    background: #166534;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(21, 128, 61, .30);
}

.mcp-ow-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(21, 128, 61, .20);
}

.mcp-ow-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mcp-ow-submit:focus-visible {
    outline: 2px solid #15803d;
    outline-offset: 2px;
}

/* ============================================================
   ERROR STATE
   ============================================================ */

.mcp-ow-error {
    padding: .65rem .85rem;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: .875rem;
    margin-bottom: .65rem;
    line-height: 1.4;
    animation: mcp-fadeIn .3s ease;
}

/* ============================================================
   LOADING DOTS
   ============================================================ */

.mcp-ow-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.mcp-ow-dots span {
    width: 12px;
    height: 12px;
    background: #482d70;
    border-radius: 50%;
    display: block;
    animation: mcp-bounce 1.2s infinite ease-in-out;
}

.mcp-ow-dots span:nth-child(2) {
    animation-delay: .2s;
}

.mcp-ow-dots span:nth-child(3) {
    animation-delay: .4s;
}

/* ============================================================
   REWARD SCREEN
   ============================================================ */

.mcp-ow-reward-screen {
    text-align: center;
    animation: mcp-fadeIn .4s ease;
}

.mcp-ow-reward-icon {
    width: 72px;
    height: 72px;
    background: #f0ebf8;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 2rem;
}

.mcp-ow-reward-text {
    font-size: 1rem;
    color: #555;
    margin: .5rem 0 1.5rem;
    line-height: 1.5;
}

.mcp-ow-reward-btn {
    display: inline-block;
    padding: 1rem 3rem;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: #15803d;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 4px 14px rgba(21, 128, 61, .30);
    transition: background-color .2s ease,
                transform .15s ease,
                box-shadow .2s ease;
}

.mcp-ow-reward-btn:hover {
    background: #166534;
    transform: scale(1.03);
    box-shadow: 0 6px 22px rgba(21, 128, 61, .38);
}

.mcp-ow-reward-btn:active {
    transform: scale(.99);
    box-shadow: 0 3px 10px rgba(21, 128, 61, .25);
}

.mcp-ow-reward-btn:focus-visible {
    outline: 2px solid #15803d;
    outline-offset: 2px;
}

/* ============================================================
   AD SCREEN
   ============================================================ */

.mcp-ow-ad-screen {
    text-align: center;
}

.mcp-ow-ad-label {
    font-size: .8rem;
    color: #666;
    font-weight: 600;
    margin: 0 0 .75rem;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.mcp-ow-ad-container {
    min-height: 250px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
}

.mcp-ow-ad-loading {
    color: #555;
    font-size: 1rem;
}

.mcp-ow-ad-placeholder {
    width: 100%;
    min-height: 250px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px;
}

.mcp-ow-countdown {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 1rem;
}

.mcp-ow-countdown strong {
    color: #482d70;
    font-size: 1.3rem;
    font-weight: 800;
    display: inline-block;
    padding: 0 .25rem;
}

.mcp-ow-unlock-btn {
    display: inline-block;
    padding: .9rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: #15803d;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 4px 14px rgba(21, 128, 61, .30);
    transition: background-color .2s ease,
                transform .15s ease,
                box-shadow .2s ease;
    animation: mcp-fadeIn .4s ease;
}

.mcp-ow-unlock-btn:hover {
    background: #166534;
    transform: scale(1.03);
}

.mcp-ow-unlock-btn:active {
    transform: scale(.99);
}

/* ============================================================
   DISCLAIMER
   ============================================================ */

.mcp-ow-ad-disclaimer {
    font-size: .78rem;
    color: #888;
    line-height: 1.5;
    margin: 1.25rem 0 0;
    padding: .6rem .85rem;
    background: #f8f8f8;
    border-radius: 6px;
    text-align: center;
}

/* ============================================================
   REVEALED CONTENT
   ============================================================ */

.mcp-revealed {
    animation: mcp-fadeIn .5s ease;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes mcp-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mcp-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes mcp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   REDUCED MOTION PREFERENCE
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .mcp-offerwall-modal {
        animation: none;
    }
    .mcp-ow-dots span {
        animation: none;
        transform: scale(1);
    }
    .mcp-ow-option,
    .mcp-ow-submit,
    .mcp-ow-reward-btn,
    .mcp-ow-unlock-btn {
        transition: none;
    }
    .mcp-revealed,
    .mcp-ow-reward-screen,
    .mcp-ow-error {
        animation: none;
    }
}

/* ============================================================
   SMALL SCREENS
   ============================================================ */

@media (max-width: 480px) {
    .mcp-offerwall-content {
        padding: 1.5rem 1.25rem 2rem;
    }
    .mcp-ow-question {
        font-size: 1.2rem;
    }
    .mcp-ow-reward-btn {
        padding: .85rem 2rem;
        font-size: 1.05rem;
    }
}

/* --- Reward Ready (skip flow) --- */
.mcp-ow-reward-ready {
    text-align: center;
    padding: 1rem 0;
}
.mcp-ow-ready-icon {
    font-size: 3rem;
    margin-bottom: .75rem;
    line-height: 1;
}

.mcp-ow-submit--play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.mcp-ow-submit-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: var(--mcp-primary, #482d70);
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.mcp-ow-submit--loading {
    background: #166534;
    cursor: progress;
    opacity: 1;
}

.mcp-ow-submit-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    flex-shrink: 0;
    animation: mcp-ow-spin .8s linear infinite;
}

@keyframes mcp-ow-spin {
    to { transform: rotate(360deg); }
}
