/* Override browser autofill yellow background for dark theme */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active,
.rz-inputtext:-webkit-autofill,
.rz-textbox:-webkit-autofill,
.rz-password:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #1e293b inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #e2e8f0 !important;
    transition: background-color 5000s ease-in-out 0s;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Blazor SSR wrapper elements must not break flex height chain */
blazor-ssr {
    display: contents;
}

/* Radzen layout fills full viewport */
.rz-layout {
    min-height: 100vh !important;
    height: 100vh !important;
}

/* Sidebar always visible at full height */
.rz-sidebar {
    height: 100% !important;
    min-height: 100vh !important;
}

.admin-not-found, .admin-access-denied {
    padding: 60px;
    text-align: center;
}

/* ==================== LOGIN PAGE ==================== */

.login-layout {
    height: 100%;
}

.login-page {
    display: flex;
    height: 100vh;
    overflow: hidden;
    align-items: stretch;
}

/* Left Column — 66.67% light */
.login-left-col {
    flex: 0 0 66.67%;
    max-width: 66.67%;
    background: #f8fafc;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    box-sizing: border-box;
}

.login-left-content {
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-brand {
    color: #1e293b;
    font-weight: 700;
    margin: 0;
}

.login-tagline {
    color: #64748b;
    font-weight: 400;
    margin-top: 0.25rem;
}

/* Info Cards */
.info-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.info-icon {
    color: #3b82f6 !important;
    font-size: 1.5rem;
}

.info-title {
    color: #1e293b !important;
    font-weight: 600;
}

.info-text {
    color: #64748b !important;
    line-height: 1.6;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
}

/* Dark Login Card */
.login-card-dark {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.login-card-dark .login-title {
    color: #f1f5f9;
    font-weight: 700;
    margin: 0;
}

.login-card-dark .login-subtitle {
    color: #94a3b8;
    margin: 0;
}

.login-card-dark .login-footer {
    color: #64748b;
    text-align: center;
}

/* Simple Form Fields - Dark Theme */
.login-card-dark .field-label {
    color: #94a3b8 !important;
    font-weight: 500;
}

.login-card-dark .login-input {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    color: #f1f5f9 !important;
    width: 100%;
    padding: 12px 16px !important;
}

.login-card-dark .login-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    outline: none !important;
}

.login-card-dark .login-input::placeholder {
    color: #64748b !important;
}

.login-card-dark .login-btn {
    margin-top: 0.5rem;
}

.login-card-dark .rz-button {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    width: 100%;
}

.login-card-dark .rz-button:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

/* Right column — 33.33% dark */
.login-right-col {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Native form elements */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.login-card-dark form .login-input {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f1f5f9;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.login-card-dark form .login-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.login-card-dark form .login-input::placeholder {
    color: #64748b;
}

.login-card-dark .login-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.login-card-dark .login-btn:hover {
    background: #2563eb;
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #fca5a5;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Info cards as block elements */
.info-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.info-card .info-title {
    color: #1e293b;
    font-weight: 600;
}

.info-card .info-text {
    margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .login-left-col {
        display: none;
    }

    .login-right-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Hero designer preview — storefront-matching stage + caption layout */
.hero-designer-preview {
    --hero-carousel-navy: #0f2a44;
    position: relative;
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 1280 / 600;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rz-base-600);
    cursor: crosshair;
    user-select: none;
    container-type: inline-size;
    container-name: hero;
}

.hero-designer-preview__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.hero-designer-preview__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.hero-designer-preview__guides {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.hero-designer-preview__guide-v,
.hero-designer-preview__guide-h {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
}

.hero-designer-preview__guide-v {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    transform: translateX(-50%);
}

.hero-designer-preview__guide-h {
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
}

.hero-designer-preview .hero-caption-stage--preview,
.hero-designer-preview .hero-caption-stage {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    color: white;
    pointer-events: none;
    opacity: 1;
}

.hero-designer-preview .hero-caption-stage .slide-eyebrow,
.hero-designer-preview .hero-caption-stage .slide-title,
.hero-designer-preview .hero-caption-stage .slide-subtitle {
    margin: 0;
    padding: 0;
}

.hero-designer-preview .hero-caption-stage .slide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 7px;
}

.hero-designer-preview .hero-caption-stage .slide-eyebrow::before {
    content: '';
    width: 32px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

.hero-designer-preview .hero-caption-stage .slide-title {
    font-size: clamp(var(--slide-title-size-min, 24px), 4.8cqi, var(--slide-title-size, 48px));
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
    margin-bottom: 9px;
}

.hero-designer-preview .hero-caption-stage .slide-title em {
    color: var(--slide-title-accent, #ffd966);
    font-style: italic;
}

.hero-designer-preview .hero-caption-stage .slide-subtitle {
    font-size: clamp(var(--slide-subtitle-size-min, 12px), 1.15cqi, var(--slide-subtitle-size, 17px));
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    opacity: var(--slide-subtitle-opacity, 1);
    margin-bottom: 0;
}

.hero-designer-preview .hero-caption-stage .hero-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin-top: 17px;
    padding: 15px 32px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(43, 184, 200, 0.4);
    text-decoration: none;
    pointer-events: auto;
}

.hero-designer-preview .slide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    width: fit-content;
}

.hero-designer-preview .slide-eyebrow::before {
    content: '';
    width: 32px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

.hero-designer-preview .slide-title {
    font-weight: 800;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.hero-designer-preview .slide-title em {
    color: var(--slide-title-accent, #ffd966);
    font-style: italic;
}

.hero-designer-preview .slide-subtitle {
    font-weight: 500;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.hero-designer-preview .hero-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 15px 32px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(43, 184, 200, 0.4);
    text-decoration: none;
    pointer-events: auto;
}

.hero-designer-preview .carousel-arrow {
    position: absolute;
    top: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: var(--hero-carousel-navy);
    z-index: 6;
    transform: translateY(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.2s;
    pointer-events: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-designer-preview .carousel-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    background: white;
}

.hero-designer-preview .carousel-arrow.prev {
    left: 14px;
}

.hero-designer-preview .carousel-arrow.next {
    right: 14px;
}

.hero-designer-preview .carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 6;
    pointer-events: auto;
}

.hero-designer-preview .carousel-indicators .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: default;
    transition: 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
}

.hero-designer-preview .carousel-indicators .dot.active {
    background: white;
    width: 24px;
    border-radius: 999px;
}

.hero-designer-preview .carousel-indicators .dot--clickable {
    cursor: pointer;
}

/* Return request — admin notes preview & editor (BackOffice dark theme) */
.return-admin-notes {
    padding: 0.75rem 1rem;
    border: 1px solid var(--rz-base-600);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-900);
    color: var(--rz-text-color);
    font-size: 0.875rem;
    line-height: 1.6;
}

.return-admin-notes p {
    margin: 0 0 0.75em;
    color: inherit;
    background: transparent !important;
}

.return-admin-notes p:last-child {
    margin-bottom: 0;
}

.return-admin-notes ul,
.return-admin-notes ol {
    margin: 0.5em 0 0.75em 1.25em;
    padding: 0;
}

.return-admin-notes li {
    margin-bottom: 0.25em;
}

.return-admin-notes a {
    color: var(--rz-info);
    text-decoration: underline;
}

.return-admin-notes a:hover {
    color: var(--rz-info-lighter);
}

.return-admin-notes strong,
.return-admin-notes b {
    color: var(--rz-base-0);
    font-weight: 600;
}

.return-admin-notes-helper {
    color: var(--rz-base-400) !important;
    line-height: 1.5;
}

.return-admin-notes-dialog .return-admin-notes-editor {
    min-height: 320px;
}

.return-admin-notes-dialog .return-admin-notes-editor .rz-html-editor-content {
    min-height: 260px;
}
