/**
 * LADS Internal - Reusable UI Components
 * Replace inline styles with these classes for consistency and theme support.
 * Multi-company themes can override these via themes/{company}/overrides.css
 */

/* ===== Logo & Branding ===== */
.logo-header {
    max-height: 40px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-header-sm {
    max-height: 30px;
    max-width: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ===== Header Elements ===== */
.header-user-menu {
    flex-wrap: nowrap;
}

.header-clock {
    text-align: center;
    line-height: 1.4;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.header-clock-time {
    font-size: 15px;
    font-weight: 900;
    color: #000000;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.header-clock-date {
    font-size: 10px;
    color: #6c757d;
    margin-top: 2px;
}

.base-currency-indicator {
    text-align: center;
    line-height: 1.4;
    padding: 5px 10px;
    border-radius: 4px;
}

.base-currency-indicator .currency-code {
    font-size: 12px;
    font-weight: 600;
    font-family: Arial, sans-serif;
}

.base-currency-indicator .currency-label {
    font-size: 11px;
    margin-top: 2px;
    font-weight: 500;
}

/* ===== Avatar & User ===== */
.avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4361ee;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.avatar-initials-lg {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4361ee;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-img-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== Company Switcher ===== */
.company-switcher {
    list-style: none;
}

.company-switcher.hidden {
    display: none !important;
}

.company-switcher-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
}

.company-switcher-name {
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-switcher-dropdown {
    min-width: 200px;
}

.company-switcher-header {
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
}

/* ===== Modals & Overlays ===== */
.modal-backdrop-show {
    display: block !important;
    background-color: rgba(0, 0, 0, 0.5);
}

/* ===== Cards & Containers ===== */
.card-body-scroll {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

/* ===== Forms ===== */
.color-picker-swatch {
    width: 50px;
}

.color-hex-input {
    width: 100px;
}

.form-control-auto {
    width: auto;
}

/* ===== Images ===== */
.img-preview-lg {
    max-height: 80px;
}

/* ===== Icons ===== */
.icon-muted {
    opacity: 0.3;
}

/* ===== Mobile Header ===== */
.header-clock-mobile {
    font-size: 14px;
    font-weight: 700;
    color: #1B2950;
}

.base-currency-text-mobile {
    font-size: 11px;
    margin-top: 4px;
}

/* ===== Forms ===== */
.form-select-auto {
    width: auto;
}

/* ===== Tables ===== */
.th-sortable {
    cursor: pointer;
}

/* ===== Empty States ===== */
.empty-state-icon {
    width: 80px;
}

.empty-state-btn {
    /* Standardize empty-state CTA; use btn btn-outline-primary for theme support */
}

.empty-state-icon-lg {
    width: 64px;
    height: 64px;
}

/* ===== Livewire Modals ===== */
.modal-backdrop-livewire {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.modal-show-livewire {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow-y: auto;
}

.modal-show-livewire .modal-dialog {
    margin: auto;
}

.modal-overlay-livewire {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

/* For modals where the outer div is both overlay and container (e.g. Bootstrap .modal.d-block) */
.modal-overlay-bg {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ===== Scroll Containers ===== */
.scroll-y {
    max-height: 200px;
    overflow-y: auto;
}

/* ===== Profile & Avatars ===== */
.avatar-profile {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.avatar-title-lg {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle-48 {
    width: 48px;
    height: 48px;
}

/* ===== Icons ===== */
.icon-feather-sm {
    width: 12px;
    height: 12px;
}

/* ===== Flex Utilities ===== */
.flex-min-width {
    min-width: 200px;
}

/* ===== Progress Bars ===== */
.progress-tall {
    height: 25px;
}

.progress-sm {
    height: 8px;
}

/* ===== Toast / Notifications ===== */
.toast-container-fixed {
    z-index: 11000;
}

/* ===== Signatures & Documents ===== */
.signature-img {
    max-height: 48px;
}

/* ===== Table Column Widths (documents, receipts, quotations) ===== */
.w-8 { width: 8%; }
.w-10 { width: 10%; }
.w-12 { width: 12%; }
.w-14 { width: 14%; }
.w-15 { width: 15%; }
.w-18 { width: 18%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-42 { width: 42%; }
.w-60 { width: 60%; }
