/*
   Public Background Standardization
   ---------------------------------
   Scope:
   - Public website, auth pages, checkout, and user panel only.
   - Admin panel intentionally remains independent and is not targeted here.

   Rule:
   - The layout owns the page background.
   - Page/section/hero wrappers stay transparent.
   - Cards, panels, forms, sliders, and media shells keep their own surfaces.
*/

:root {
    --ui-page-background:
        radial-gradient(circle at 10% -8%, rgba(124, 58, 237, .075), transparent 28rem),
        radial-gradient(circle at 92% 2%, rgba(37, 99, 235, .09), transparent 34rem),
        linear-gradient(180deg, var(--ui-app-surface-elevated) 0%, var(--ui-app-bg) 48%, var(--ui-app-surface-elevated) 100%);
}

.layout-shell {
    min-height: 100dvh;
    background: var(--ui-page-background);
}

.layout-shell .site-main {
    background: transparent !important;
}

.layout-shell :is(
    .ui-page,
    .home-page,
    .about-page,
    .contact-page,
    .collaboration-page,
    .terms-page,
    .courses-page,
    .course-details-page,
    .blog-index-page,
    .blog-detail-page,
    .instructors-page,
    .instructor-page,
    .noktebit-page,
    .auth-page,
    .checkout-page,
    .user-panel-page,
    .enrollment-details-page,
    .spot-watch-page,
    .error-page
) {
    background: transparent !important;
    background-image: none !important;
}

.layout-shell :is(
    .ui-section,
    .section,
    .section--muted,
    .about-section,
    .about-section--soft,
    .about-cta-section,
    .contact-section,
    .collaboration-section,
    .collaboration-section--soft,
    .collaboration-cta-section,
    .terms-section,
    .blog-index-filter-section,
    .latest-articles-section,
    .course-comments-section,
    .course-tab-section,
    .course-tab-section--description,
    .course-tab-section--syllabus,
    .user-tab-section,
    .academy-seo-section,
    .feature-strip,
    .home-features-block,
    .home-hero-block,
    .noktebit-strip
) {
    background: transparent !important;
    background-image: none !important;
}

.layout-shell :is(
    .ui-hero,
    .hero-section,
    .about-hero,
    .contact-hero,
    .collaboration-hero,
    .terms-hero,
    .course-hero,
    .blog-index-hero,
    .blog-detail-hero,
    .instructors-hero,
    .instructor-hero,
    .noktebit-hero,
    .user-hero,
    .spot-watch-hero,
    .checkout-hero-content
) {
    background: transparent !important;
    background-image: none !important;
}

.layout-shell :is(
    .noktebit-page,
    .noktebit-hero,
    .noktebit-strip,
    .section--muted,
    .about-section--soft,
    .collaboration-section--soft
)::before,
.layout-shell :is(
    .noktebit-page,
    .noktebit-hero,
    .section--muted,
    .about-section--soft,
    .collaboration-section--soft
)::after {
    background: transparent !important;
    background-image: none !important;
    opacity: 0 !important;
}

.layout-shell :is(
    .ui-card,
    .ui-panel,
    .glass-card,
    .glass-panel,
    .content-card,
    .checkout-card,
    .order-summary,
    .auth-card,
    .data-card,
    .panel-card,
    .manage-card,
    .blog-detail,
    .state-card,
    .not-found-card,
    .about-hero-card,
    .about-feature-card,
    .about-story__panel,
    .contact-card,
    .contact-highlight-card,
    .collaboration-card,
    .collaboration-highlight-card,
    .terms-card,
    .blog-filter-card,
    .blog-featured-card,
    .blog-content-card,
    .blog-comments-card,
    .blog-author-card,
    .blog-share-card,
    .blog-related-card,
    .course-buy-card,
    .course-content-tabs-card,
    .course-instructors-card,
    .course-comment-card,
    .course-comment-form-card,
    .checkout-hero-card,
    .checkout-step-card,
    .checkout-progress-panel,
    .identity-verification-card,
    .identity-alert-card,
    .info-action-card,
    .user-card,
    .user-kpi-card,
    .user-empty-card,
    .user-state-card,
    .user-enrollment-card,
    .user-transaction-card,
    .user-ticket-list-card,
    .user-ticket-detail-card,
    .wallet-card,
    .license-key-panel,
    .license-empty-panel,
    .license-renew-panel,
    .license-renewal-history-card,
    .license-studio-card,
    .online-live-access-card,
    .online-live-addon-card,
    .online-live-preview-card,
    .spot-access-card,
    .spot-ad-card,
    .spot-download-panel,
    .spot-watch-state-card,
    .instructor-card,
    .instructor-course-card,
    .details-instructor-card,
    .academy-seo-card,
    .feature-item
) {
    background-color: var(--ui-app-surface-elevated);
}

.layout-shell :is(.checkout-info-strip, .checkout-info-strip--muted, .identity-verification-card__intro, .identity-verification-card__tips) {
    background: var(--ui-app-surface-muted-glass);
}

/* Auth input visibility fix
   Keeps the standardized UI layer from flattening the original auth input shells. */
.layout-shell :is(.auth-page) .auth-card--form :is(.auth-input-shell) {
    border: 1.5px solid rgba(37, 99, 235, .22);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.layout-shell :is(.auth-page) .auth-card--form :is(.auth-input-shell):hover {
    border-color: rgba(37, 99, 235, .34);
}

.layout-shell :is(.auth-page) .auth-card--form :is(.auth-input-shell):focus-within {
    border-color: rgba(37, 99, 235, .72);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12), 0 14px 34px rgba(15, 23, 42, .09);
}

.layout-shell :is(.auth-page) .auth-card--form :is(.auth-input) {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.layout-shell :is(.auth-page) .auth-card--form :is(.auth-input):focus {
    border-color: transparent;
    box-shadow: none;
}

.layout-shell :is(.auth-page) :is(.auth-input-prefix, .auth-input-icon) {
    border-left-color: rgba(37, 99, 235, .16);
    background: linear-gradient(180deg, rgba(239, 246, 255, .98), rgba(219, 234, 254, .72));
}

/* Verification OTP fields - especially mobile. */
.layout-shell :is(.auth-page) .auth-card--otp .otp-row {
    align-items: center;
    justify-items: center;
    width: min(100%, 24rem);
    margin-inline: auto;
}

.layout-shell :is(.auth-page) .auth-card--otp .otp-row input[data-otp-input] {
    width: 100%;
    min-width: 0;
    max-width: 3.65rem;
    height: 3.75rem;
    border: 1.5px solid rgba(37, 99, 235, .24);
    border-radius: 1rem;
    background: #ffffff;
    color: var(--color-text);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06), inset 0 1px 0 rgba(255, 255, 255, .95);
    caret-color: var(--color-primary);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base), background var(--transition-base);
}

.layout-shell :is(.auth-page) .auth-card--otp .otp-row input[data-otp-input]:hover {
    border-color: rgba(37, 99, 235, .38);
}

.layout-shell :is(.auth-page) .auth-card--otp .otp-row input[data-otp-input]:focus {
    border-color: rgba(37, 99, 235, .78);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .13), 0 14px 30px rgba(15, 23, 42, .1);
    transform: translateY(-1px);
}

@media (max-width: 560px) {
    .layout-shell :is(.auth-page) .auth-card--otp {
        padding-inline: 1rem;
    }

    .layout-shell :is(.auth-page) .auth-card--otp .otp-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: clamp(.36rem, 2.1vw, .55rem);
        width: 100%;
        max-width: 19rem;
    }

    .layout-shell :is(.auth-page) .auth-card--otp .otp-row input[data-otp-input] {
        width: 100% !important;
        height: clamp(3.05rem, 13vw, 3.45rem) !important;
        max-width: none;
        border-radius: .9rem;
        font-size: clamp(1.12rem, 5vw, 1.3rem) !important;
    }
}

@media (max-width: 380px) {
    .layout-shell :is(.auth-page) .auth-card--otp .otp-row {
        gap: .32rem;
        max-width: 17.4rem;
    }

    .layout-shell :is(.auth-page) .auth-card--otp .otp-row input[data-otp-input] {
        height: 2.95rem !important;
        border-radius: .78rem;
    }
}
