/* Maiaco Warranty Inquiry — shadcn-inspired minimal light/dark UI */

:root,
html[data-theme="light"] {
    --background: hsl(320 33% 98%);
    --foreground: hsl(224 26% 13%);
    --card: hsl(0 0% 100%);
    --card-foreground: hsl(224 26% 13%);
    --muted: hsl(315 20% 95%);
    --muted-foreground: hsl(222 12% 40%);
    --border: hsl(315 15% 88%);
    --primary: #e312b6;
    --primary-hover: #d60fad;
    --primary-muted: rgba(227, 18, 182, 0.08);
    --success: #10b981;
    --success-muted: rgba(16, 185, 129, 0.12);
    --danger: #ef4444;
    --danger-muted: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-muted: rgba(245, 158, 11, 0.12);
    --radius: 0.75rem;
    --font: "Vazirmatn", system-ui, sans-serif;
}

html[data-theme="dark"] {
    --background: hsl(0 0% 7%);
    --foreground: hsl(0 0% 96.1%);
    --card: hsl(0 0% 9%);
    --card-foreground: hsl(0 0% 96.1%);
    --muted: hsl(0 0% 12%);
    --muted-foreground: hsl(0 0% 65%);
    --border: hsl(0 0% 16%);
    --primary: #e312b6;
    --primary-hover: #d60fad;
    --primary-muted: rgba(227, 18, 182, 0.12);
    --success: #10b981;
    --success-muted: rgba(16, 185, 129, 0.12);
    --danger: #ef4444;
    --danger-muted: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-muted: rgba(245, 158, 11, 0.12);
    --radius: 0.75rem;
    --font: "Vazirmatn", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.inquiry-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.inquiry-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg,
            rgba(253, 248, 252, 0.98) 0%,
            rgba(248, 241, 249, 0.86) 48%,
            rgba(227, 18, 182, 0.07) 100%),
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(227, 18, 182, 0.055), transparent),
        var(--background);
    transition: background 0.3s ease;
}

html[data-theme="dark"] .inquiry-bg {
    background:
        linear-gradient(135deg, 
            rgba(30, 20, 40, 1) 0%,
            rgba(40, 25, 55, 0.8) 50%,
            rgba(227, 18, 182, 0.1) 100%),
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(227, 18, 182, 0.08), transparent),
        var(--background);
}

.inquiry-container {
    width: min(1100px, 100% - 2rem);
    margin-inline: auto;
}

/* Header */
.inquiry-header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    overflow: hidden;
}

.inquiry-header--glassy {
    background: transparent;
    border-bottom-color: rgba(227, 18, 182, 0.18);
}

.inquiry-header__glassy-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.82) 0%,
        rgba(250, 242, 249, 0.78) 52%,
        rgba(227, 18, 182, 0.09) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: -1;
}

html[data-theme="dark"] .inquiry-header__glassy-bg {
    background: linear-gradient(135deg, 
        rgba(227, 18, 182, 0.15) 0%,
        rgba(227, 18, 182, 0.08) 50%,
        rgba(227, 18, 182, 0.1) 100%);
}

.inquiry-header__inner {
    display: flex;
    align-items: center;
    min-height: 5.5rem;
    position: relative;
    z-index: 1;
}

.inquiry-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.inquiry-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.inquiry-brand__title {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.inquiry-brand__subtitle {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 500;
    line-height: 1.75;
}

html[data-theme="dark"] .inquiry-brand__subtitle {
    color: #9ca3af;
}

/* Theme Toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    color: var(--foreground);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    padding: 0;
    margin-right: 0.75rem;
}

.theme-toggle:hover {
    background: var(--muted);
    border-color: var(--muted-foreground);
}

.theme-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    display: none;
}

html[data-theme="light"] .theme-toggle .sun-icon {
    display: flex;
}

html[data-theme="dark"] .theme-toggle .moon-icon {
    display: flex;
}

/* Main */
.inquiry-main {
    padding: 2.5rem 0 4rem;
}

.inquiry-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-direction: column;
}

.inquiry-hero__content {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}

.inquiry-hero__logo {
    width: 14rem;
    height: 14rem;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 12px 36px rgba(227, 18, 182, 0.3));
    order: -1;
}

.inquiry-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--muted);
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 1rem;
}

html[data-theme="dark"] .inquiry-hero__badge {
    color: #d1d5db;
}

.inquiry-hero__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.inquiry-hero__desc {
    margin: 0 auto;
    max-width: 36rem;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 500;
}

html[data-theme="dark"] .inquiry-hero__desc {
    color: #d1d5db;
}

/* Grid */
.inquiry-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .inquiry-grid {
        grid-template-columns: 1fr 1.1fr;
        align-items: start;
    }
}

/* Card */
.inquiry-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.inquiry-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    color: var(--muted-foreground);
}

.inquiry-card__header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--foreground);
}

.inquiry-card--empty {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

/* Form */
.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.inquiry-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.inquiry-field__hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 400;
}

html[data-theme="dark"] .inquiry-field__hint {
    color: #9ca3af;
}

.inquiry-field__error {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--danger);
}

/* Glow field — animated border */
.glow-field {
    position: relative;
    border-radius: calc(var(--radius) - 2px);
    padding: 1px;
    background: var(--border);
    transition: box-shadow 0.3s ease;
}

.glow-field__shine {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from var(--glow-angle, 0deg),
        transparent 0deg,
        var(--primary) 90deg,
        transparent 180deg,
        rgba(168, 12, 119, 0.4) 270deg,
        transparent 360deg
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: glow-spin 4s linear infinite;
}

.glow-field:focus-within {
    box-shadow: 0 0 0 1px rgba(227, 18, 182, 0.2), 0 0 24px rgba(227, 18, 182, 0.12);
}

.glow-field:focus-within .glow-field__shine {
    opacity: 1;
}

@property --glow-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes glow-spin {
    to {
        --glow-angle: 360deg;
    }
}

@property --neon-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes neon-border-rotate {
    0% {
        --neon-angle: 0deg;
    }
    100% {
        --neon-angle: 360deg;
    }
}

.inquiry-input,
.inquiry-select {
    width: 100%;
    display: block;
    padding: 0.625rem 0.875rem;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--foreground);
    background: hsl(0 0% 100%);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 4px);
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}

.inquiry-input::placeholder {
    color: var(--muted-foreground);
}

.inquiry-input:focus,
.inquiry-select:focus {
    background: hsl(0 0% 100%);
    border-color: var(--primary);
}

.inquiry-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    padding-left: 2.25rem;
}

/* Button */
.inquiry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.7rem 1rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.inquiry-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 20px rgba(227, 18, 182, 0.25);
}

.inquiry-btn:active {
    transform: scale(0.98);
}

/* Alerts */
.inquiry-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
}

.inquiry-alert--error {
    background: var(--danger-muted);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #dc2626;
    font-weight: 500;
}

html[data-theme="dark"] .inquiry-alert--error {
    color: #fca5a5;
}

.inquiry-alert--warning {
    background: var(--warning-muted);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: #d97706;
    font-weight: 500;
    margin-bottom: 1rem;
}

html[data-theme="dark"] .inquiry-alert--warning {
    color: #fcd34d;
}

/* Status banner */
.status-banner {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    border: none;
    transition: all 0.2s ease;
}

/* Active warranty - green background */
.status-banner--success {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.14) 0%,
        rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.status-banner--success .status-banner__icon {
    background: rgba(16, 185, 129, 0.18);
}

html[data-theme="light"] .status-banner--success .status-banner__icon {
    color: #047857;
}

html[data-theme="light"] .status-banner--success .status-banner__value {
    color: #065f46;
    font-weight: 700;
}

html[data-theme="light"] .status-banner--success .status-banner__desc {
    color: #065f46;
}

html[data-theme="dark"] .status-banner--success .status-banner__icon {
    color: #6ee7b7;
}

html[data-theme="dark"] .status-banner--success .status-banner__value {
    color: #a7f3d0;
    font-weight: 700;
}

html[data-theme="dark"] .status-banner--success .status-banner__desc {
    color: #d1fae5;
}

/* Cancelled warranty - bright red background */
.status-banner--danger {
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.13) 0%,
        rgba(239, 68, 68, 0.08) 100%);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.status-banner--danger .status-banner__icon {
    background: rgba(239, 68, 68, 0.18);
}

html[data-theme="light"] .status-banner--danger .status-banner__icon {
    color: #b91c1c;
}

html[data-theme="light"] .status-banner--danger .status-banner__value {
    color: #991b1b;
    font-weight: 700;
}

html[data-theme="light"] .status-banner--danger .status-banner__desc {
    color: #991b1b;
}

html[data-theme="dark"] .status-banner--danger .status-banner__icon {
    color: #fca5a5;
}

html[data-theme="dark"] .status-banner--danger .status-banner__value {
    color: #fecaca;
    font-weight: 700;
}

html[data-theme="dark"] .status-banner--danger .status-banner__desc {
    color: #fee2e2;
}

/* Expired warranty - gray/grayish background */
.status-banner--muted {
    background: linear-gradient(135deg,
        rgba(107, 114, 128, 0.13) 0%,
        rgba(107, 114, 128, 0.08) 100%);
    border: 1px solid rgba(107, 114, 128, 0.28);
}

.status-banner--muted .status-banner__icon {
    background: rgba(107, 114, 128, 0.18);
}

html[data-theme="light"] .status-banner--muted .status-banner__icon {
    color: #4b5563;
}

html[data-theme="light"] .status-banner--muted .status-banner__value {
    color: #4b5563;
    font-weight: 700;
}

html[data-theme="light"] .status-banner--muted .status-banner__desc {
    color: #374151;
}

html[data-theme="dark"] .status-banner--muted .status-banner__icon {
    color: #9ca3af;
}

html[data-theme="dark"] .status-banner--muted .status-banner__value {
    color: #d1d5db;
    font-weight: 700;
}

html[data-theme="dark"] .status-banner--muted .status-banner__desc {
    color: #e5e7eb;
}

.status-banner__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
}

.status-banner__body {
    min-width: 0;
}

.inquiry-hero__title,
.inquiry-card__header h2,
.inquiry-field label,
.result-item dd {
    color: var(--card-foreground);
}

.status-banner__label {
    display: block;
    font-size: 0.75rem;
    color: #4b5563;
    margin-bottom: 0.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

html[data-theme="dark"] .status-banner__label {
    color: #9ca3af;
}

.status-banner__value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.status-banner__desc {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Result grid */
.result-grid {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

@media (min-width: 500px) {
    .result-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Result items with animated purple neon borders */
.result-item {
    padding: 0.875rem 1.125rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid var(--border);
    background: hsl(315 30% 98%);
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}

html[data-theme="dark"] .result-item {
    background: hsl(0 0% 5%);
}

/* Animated neon border for model and serial number items */
.result-item--neon {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    animation: neon-border-rotate 3s linear infinite;
}

.result-item--neon .result-item__inner {
    width: 100%;
    height: 100%;
    padding: 0.875rem 1.125rem;
    border-radius: calc(var(--radius) - 2px);
    background: hsl(315 30% 98%);
    border: 1px solid var(--border);
    background-clip: padding-box;
    position: relative;
}

html[data-theme="dark"] .result-item--neon .result-item__inner {
    background: hsl(0 0% 5%);
}

.result-item--neon .result-item__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(
        var(--neon-angle, 0deg),
        #e312b6,
        #d60fad 25%,
        #e312b6 50%,
        #d60fad 75%,
        #e312b6
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Glow effect for neon items */
.result-item--neon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(
        var(--neon-angle, 0deg),
        rgba(227, 18, 182, 0.35),
        rgba(214, 15, 173, 0.2),
        rgba(227, 18, 182, 0.35)
    );
    filter: blur(6px);
    z-index: -1;
    opacity: 0.7;
    animation: neon-border-rotate 3s linear infinite;
}

.result-item dt {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

html[data-theme="dark"] .result-item dt {
    color: #9ca3af;
}

.result-item dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--card-foreground);
    line-height: 1.4;
}

html[data-theme="dark"] .result-item dd {
    color: #f3f4f6;
}

/* Highlighted item (remaining days) - light purple background */
.result-item--highlight {
    grid-column: 1 / -1;
    border-color: rgba(227, 18, 182, 0.3);
    background: linear-gradient(135deg, rgba(227, 18, 182, 0.12) 0%, rgba(227, 18, 182, 0.08) 100%);
    position: relative;
}

html[data-theme="dark"] .result-item--highlight {
    background: linear-gradient(135deg, rgba(227, 18, 182, 0.15) 0%, rgba(227, 18, 182, 0.08) 100%);
    border-color: rgba(227, 18, 182, 0.35);
}

.result-mono {
    font-family: ui-monospace, "Cascadia Code", monospace;
    letter-spacing: 0.04em;
}

.remaining-badge {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.remaining-unit {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    margin-right: 0.25rem;
}

html[data-theme="dark"] .remaining-unit {
    color: #9ca3af;
}

/* Invalid reason */
.invalid-reason {
    margin-top: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.15);
    background: var(--danger-muted);
    overflow: hidden;
}

.invalid-reason__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.invalid-reason__head h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.invalid-reason__body {
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--card-foreground);
    font-weight: 500;
}

html[data-theme="dark"] .invalid-reason__body {
    color: #e5e7eb;
}

/* Empty state */
.inquiry-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    color: #4b5563;
}

html[data-theme="dark"] .inquiry-empty {
    color: #9ca3af;
}

.inquiry-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--muted);
    margin-bottom: 1rem;
    color: var(--muted-foreground);
}

.inquiry-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--foreground);
}

.inquiry-empty p {
    margin: 0;
    font-size: 0.875rem;
    max-width: 16rem;
    color: #4b5563;
    font-weight: 500;
}

html[data-theme="dark"] .inquiry-empty p {
    color: #d1d5db;
}

/* Footer */
.inquiry-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
}

.inquiry-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.inquiry-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 500;
}

html[data-theme="dark"] .inquiry-footer p {
    color: #9ca3af;
}

.inquiry-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(227, 18, 182, 0.2);
    background: var(--primary-muted);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.inquiry-footer__link:hover {
    color: var(--primary-hover);
    border-color: rgba(227, 18, 182, 0.35);
    background: rgba(227, 18, 182, 0.12);
}

/* Icons */
.icon-xs { width: 0.875rem; height: 0.875rem; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.125rem; height: 1.125rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }