/* ============================================================
   We4Cleaning — Component Styles
   Premium glassmorphism cards, buttons, forms, navbar
   ============================================================ */

/* --- Navbar --- */
.wn-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: 1rem 0;
    transition: all var(--transition-base);
    background: transparent;
}

.wn-navbar.scrolled {
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

.wn-navbar .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wn-navbar .navbar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.wn-navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.wn-navbar .nav-link:hover,
.wn-navbar .nav-link.active {
    color: var(--text-primary) !important;
}

.wn-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.navbar-toggler {
    border: 1px solid var(--border-default) !important;
    padding: 0.375rem 0.625rem;
}
.navbar-toggler-icon {
    filter: invert(1);
}

/* --- Glass Card --- */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-default);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* --- Feature Card --- */
.feature-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
}

.feature-card .feature-icon.icon-primary {
    background: rgba(13,148,136,0.15);
    color: var(--primary-light);
    border: 1px solid rgba(13,148,136,0.2);
}

.feature-card .feature-icon.icon-accent {
    background: rgba(99,102,241,0.15);
    color: var(--accent-light);
    border: 1px solid rgba(99,102,241,0.2);
}

.feature-card .feature-icon.icon-warm {
    background: rgba(245,158,11,0.15);
    color: var(--secondary-light);
    border: 1px solid rgba(245,158,11,0.2);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow-lg);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h4 {
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* --- Service Card --- */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card .service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.service-card:hover .service-image {
    transform: scale(1.05);
}

.service-card .service-body {
    padding: var(--space-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card .service-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.service-card .service-price span {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* --- Buttons --- */
.btn-wn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(13,148,136,0.3);
}

.btn-wn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13,148,136,0.4);
    color: white;
}

.btn-wn-primary:active {
    transform: translateY(0);
}

.btn-wn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-wn-secondary:hover {
    background: var(--bg-glass);
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-wn-accent {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

.btn-wn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.4);
    color: white;
}

.btn-wn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.0625rem;
}

.btn-wn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
}

/* --- Form Controls --- */
.form-control-wn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-default) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-control-wn:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    background: var(--bg-surface) !important;
}

.form-control-wn::placeholder {
    color: var(--text-muted);
}

.form-label-wn {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.form-select-wn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-default) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important;
}

/* --- Stats Counter --- */
.stat-item {
    text-align: center;
    padding: var(--space-lg);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* --- Section Header --- */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto var(--space-3xl);
}

.section-header .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: rgba(13,148,136,0.1);
    border: 1px solid rgba(13,148,136,0.2);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
}

/* --- Footer --- */
.wn-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.wn-footer h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.wn-footer .footer-links {
    list-style: none;
    padding: 0;
}

.wn-footer .footer-links li {
    margin-bottom: 0.5rem;
}

.wn-footer .footer-links a {
    color: var(--text-muted);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.wn-footer .footer-links a:hover {
    color: var(--primary-light);
    padding-left: 4px;
}

.wn-footer .footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-xl);
    margin-top: var(--space-2xl);
}

.wn-footer .social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    margin-right: 0.5rem;
}

.wn-footer .social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* --- Testimonial Card --- */
.testimonial-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
}

.testimonial-card .quote-icon {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: var(--space-md);
}

.testimonial-card .testimonial-text {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.testimonial-card .testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-card .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.testimonial-card .author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.testimonial-card .author-role {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wn-toast {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    box-shadow: var(--shadow-xl);
    animation: slideInRight var(--transition-spring) forwards;
    backdrop-filter: blur(20px);
}

.wn-toast.toast-success { border-left: 3px solid var(--success); }
.wn-toast.toast-error { border-left: 3px solid var(--danger); }
.wn-toast.toast-warning { border-left: 3px solid var(--warning); }
.wn-toast.toast-info { border-left: 3px solid var(--info); }

/* --- Loading Spinner --- */
.wn-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-default);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* --- Step Indicator (Booking Wizard) --- */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--space-2xl);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    color: var(--text-muted);
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
}

.step-circle.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.step-circle.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-default);
    transition: all var(--transition-base);
}

.step-line.completed {
    background: var(--primary);
}

/* --- Pricing Toggle --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input { display: none; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    border: 1px solid var(--border-default);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-base);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* --- Map Container --- */
.map-container {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    height: 400px;
}

/* --- Divider with glow --- */
.divider-glow {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border: none;
    margin: var(--space-3xl) 0;
    opacity: 0.3;
}

/* --- Booking Calendar Grid (Customer) --- */
.booking-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.bcal-hdr {
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
    text-transform: uppercase;
}
.bcal-cell {
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    user-select: none;
}
.bcal-cell.empty { visibility: hidden; }
.bcal-cell.past { opacity: 0.3; color: var(--text-muted); }
.bcal-cell.unavailable {
    color: var(--text-muted);
    opacity: 0.4;
    cursor: not-allowed;
}
.bcal-cell.available {
    background: rgba(13,148,136,0.12);
    color: var(--primary-light);
    cursor: pointer;
    border: 1px solid rgba(13,148,136,0.25);
    font-weight: 600;
}
.bcal-cell.available:hover {
    background: rgba(13,148,136,0.25);
    transform: scale(1.05);
}
.bcal-cell.selected {
    background: var(--primary) !important;
    color: white !important;
    opacity: 1 !important;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

/* --- Estimate Panel Sticky (Desktop) --- */
.estimate-panel {
    position: sticky;
    top: 5rem;
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
}
.theme-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* --- Light Theme Component Overrides --- */
[data-theme="light"] .wn-navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .glass-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(13, 148, 136, 0.3);
}
[data-theme="light"] .glass-card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.03), transparent);
}

[data-theme="light"] .feature-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

[data-theme="light"] .service-card {
    background: #ffffff;
}

[data-theme="light"] .form-control-wn {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}
[data-theme="light"] .form-control-wn::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .wn-toast {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .testimonial-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

[data-theme="light"] .wn-footer {
    background: #e2e8f0;
}

[data-theme="light"] .table-dark {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
    background: transparent !important;
}
[data-theme="light"] .table-dark th,
[data-theme="light"] .table-dark td {
    color: var(--text-primary) !important;
    border-color: var(--border-default) !important;
    background: transparent !important;
}
[data-theme="light"] .table-dark.table-hover > tbody > tr:hover > * {
    background: rgba(13, 148, 136, 0.05) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .admin-sidebar {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .admin-topbar {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .option-card.selected {
    border-color: var(--primary) !important;
    background: rgba(13, 148, 136, 0.06);
}

[data-theme="light"] .btn-close-white {
    filter: none;
}

[data-theme="light"] .modal-content {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}

/* Gradient orbs — soften in light mode */
[data-theme="light"] .gradient-orb {
    opacity: 0.15;
}

/* Navbar mobile collapse */
[data-theme="light"] .wn-navbar .navbar-collapse {
    background: rgba(255, 255, 255, 0.95);
}
[data-theme="light"] .navbar-toggler-icon {
    filter: none;
}

/* Calendar cells */
[data-theme="light"] .calendar-cell {
    border-color: var(--border-default);
}
[data-theme="light"] .calendar-cell:hover {
    background: rgba(13, 148, 136, 0.06);
}

/* Slot badges */
[data-theme="light"] .slot-badge.available {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
[data-theme="light"] .slot-badge.booked {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}
