/* public/assets/css/components.css - Reusable UI Components */

/* =========================================================================
   1. FLOATING CRYSTAL NAVBAR
   ========================================================================= */
.navbar-wrapper {
    position: fixed;
    top: 1rem;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    pointer-events: none;
    transition: top 0.3s ease;
    box-sizing: border-box;
}

.navbar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--bg-glass-nav);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--crystal-border);
    box-shadow: var(--shadow-subtle), 0 0 15px var(--gold-glow);
    border-radius: var(--radius-full);
    padding: 0.45rem 1rem;
    max-width: 1360px;
    width: auto;
    min-width: 0;
    box-sizing: border-box;
    transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
    padding: 0.35rem 0.9rem;
    background: var(--bg-secondary);
    border-color: var(--crystal-border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--gold-glow);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.98rem;
    color: var(--text-heading);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-gem {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--gold-pale), var(--gold-accent));
    transform: rotate(45deg);
    box-shadow: 0 0 10px var(--gold-glow-strong);
    display: inline-block;
    border-radius: 2px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 1;
    min-width: 0;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.3rem 0.55rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold-accent);
}

.nav-link.active {
    background: var(--crystal-highlight);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-commission-badge {
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================================================================
   2. OC-THEMED CRYSTAL THEME TOGGLE
   ========================================================================= */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--crystal-surface);
    border: 1px solid var(--crystal-border);
    color: var(--gold-accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 12px var(--gold-glow-strong);
    border-color: var(--gold-accent);
}

.crystal-gem-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .theme-toggle-btn .crystal-gem-icon {
    transform: rotate(0deg);
}

[data-theme="dark"] .theme-toggle-btn .crystal-gem-icon {
    transform: rotate(180deg);
}

/* =========================================================================
   3. MOBILE NAVIGATION MENU & BREAKPOINTS
   ========================================================================= */
.mobile-nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--crystal-border);
    background: var(--bg-card);
    color: var(--gold-accent);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 1280px) {
    .nav-commission-badge {
        display: none;
    }
}

@media (max-width: 1100px) {
    .navbar {
        width: 100%;
        max-width: 100%;
    }
    .nav-links {
        display: none;
    }
    .mobile-nav-toggle {
        display: flex;
    }
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 9, 14, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 2rem var(--container-padding);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    list-style: none;
    margin-bottom: 2.5rem;
}

.mobile-menu-link {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0.5rem 0;
    display: block;
}

.mobile-menu-link:hover, .mobile-menu-link.active {
    color: var(--gold-accent);
}

/* =========================================================================
   4. BUTTONS & BADGES
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--gold-accent) 70%, var(--gold-primary) 100%);
    color: #0b0c10 !important;
    box-shadow: 0 4px 15px var(--gold-glow);
    font-weight: 700;
}

.btn-primary:hover {
    box-shadow: 0 6px 22px var(--gold-glow-strong);
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--crystal-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--crystal-border-hover);
    color: var(--gold-accent);
    box-shadow: 0 4px 15px var(--gold-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold-accent);
    color: var(--gold-accent);
}

.btn-outline:hover {
    background: var(--crystal-highlight);
    box-shadow: 0 0 15px var(--gold-glow);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* Commission Availability Badges */
.badge-commission {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-commission .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: pulseGlow 2s infinite ease-in-out;
}

.badge-commission.open {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

.badge-commission.limited {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}

.badge-commission.not_accepting {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

.badge-commission.paused {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

/* Project Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-status.active {
    background: rgba(74, 222, 128, 0.12);
    color: var(--status-active);
    border-color: rgba(74, 222, 128, 0.35);
}

.badge-status.in_development {
    background: rgba(56, 189, 248, 0.12);
    color: var(--status-dev);
    border-color: rgba(56, 189, 248, 0.35);
}

.badge-status.maintenance {
    background: rgba(251, 191, 36, 0.12);
    color: var(--status-maint);
    border-color: rgba(251, 191, 36, 0.35);
}

.badge-status.archived {
    background: rgba(148, 163, 184, 0.12);
    color: var(--status-archived);
    border-color: rgba(148, 163, 184, 0.35);
}

/* =========================================================================
   5. ANNOUNCEMENT BANNER
   ========================================================================= */
.announcement-banner {
    background: linear-gradient(90deg, #11141c 0%, rgba(212, 175, 55, 0.18) 50%, #11141c 100%);
    border-bottom: 1px solid var(--crystal-border);
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1001;
}

.announcement-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    line-height: 1;
    border-radius: var(--radius-sm);
}

.announcement-dismiss:hover {
    color: var(--text-primary);
    background: var(--crystal-highlight);
}

/* =========================================================================
   6. PRIVACY BANNER & PREFERENCES MODAL
   ========================================================================= */
.privacy-floating-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--crystal-border);
    color: var(--gold-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-subtle);
    z-index: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.privacy-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--gold-glow);
}

.privacy-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--crystal-border-hover);
    box-shadow: var(--shadow-crystal);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    z-index: 950;
    backdrop-filter: blur(16px);
    display: none;
    animation: slideUp 0.3s ease;
}

.privacy-banner.show {
    display: block;
}

/* Preferences Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--crystal-border-hover);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-crystal);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-backdrop.open .modal-dialog {
    transform: translateY(0);
}

/* =========================================================================
   7. CINEMATIC GALLERY LIGHTBOX
   ========================================================================= */
.lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 5, 8, 0.92);
    backdrop-filter: blur(20px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-image-container {
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid var(--crystal-border-hover);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 35px var(--gold-glow);
    overflow: hidden;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--crystal-border);
    color: var(--gold-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.lightbox-nav-btn:hover {
    border-color: var(--gold-accent);
    box-shadow: 0 0 15px var(--gold-glow);
}

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
}
.lightbox-close:hover { color: #fff; }

/* =========================================================================
   8. FORM CONTROLS & INQUIRY CHAT
   ========================================================================= */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--crystal-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--gold-accent);
    box-shadow: 0 0 10px var(--gold-glow);
    outline: none;
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: var(--gold-accent);
}

/* Chat Messages */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.chat-bubble {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    position: relative;
    line-height: 1.5;
}

.chat-bubble.visitor {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--crystal-border);
    border-bottom-left-radius: 2px;
}

.chat-bubble.admin {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    border: 1px solid var(--crystal-border-hover);
    border-bottom-right-radius: 2px;
}

.chat-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.chat-read-receipt {
    color: var(--gold-accent);
    font-weight: 600;
}
