/* ═══════════════════════════════════════════════════════
   Quote Management System — Custom Styles
   ═══════════════════════════════════════════════════════ */

/* ── Enhanced Table Styling ─────────────────────────── */
.fi-ta-row {
    transition: background-color 0.15s ease;
}

.fi-ta-row:hover {
    background-color: rgba(74, 92, 47, 0.04) !important;
}

/* Better badge styling */
.fi-badge {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Status badges with stronger colors */
.fi-badge-size-md {
    padding-inline: 0.625rem;
    padding-block: 0.25rem;
    font-size: 0.75rem;
}

/* ── Table Header Enhancement ────────────────────────── */
.fi-ta-header-cell {
    font-weight: 700 !important;
    font-size: 0.8125rem !important;
    color: rgba(0, 0, 0, 0.7) !important;
    text-transform: none;
    letter-spacing: 0;
}

:is(.dark) .fi-ta-header-cell {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ── Money Column Enhancement ────────────────────────── */
.fi-ta-text-item[data-suffix="%"] {
    font-variant-numeric: tabular-nums;
}

/* ── Action Buttons ──────────────────────────────────── */
.fi-ta-actions {
    gap: 0.25rem !important;
}

.fi-ta-actions .fi-icon-btn {
    transition: all 0.15s ease;
}

.fi-ta-actions .fi-icon-btn:hover {
    transform: scale(1.1);
}

/* ── Filter Badges ───────────────────────────────────── */
.fi-ta-filters-indicator {
    animation: pulse-subtle 2s infinite;
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ── Lock Icon Styling ───────────────────────────────── */
.fi-ta-text .fi-ta-text-item-icon {
    opacity: 0.8;
}

/* ── View Quote Page Tabs ────────────────────────────── */
.fi-tabs-item {
    transition: all 0.2s ease !important;
}

.fi-tabs-item:hover {
    background-color: rgba(74, 92, 47, 0.05) !important;
}

/* ── Infolist Sections ───────────────────────────────── */
.fi-in-repeatable-item {
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
}

.fi-in-repeatable-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

:is(.dark) .fi-in-repeatable-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ── Header Actions Enhancement ──────────────────────── */
.fi-header-actions .fi-btn {
    border-radius: 0.5rem !important;
    font-weight: 600;
}

/* ── Page Header ─────────────────────────────────────── */
.fi-header {
    padding-bottom: 0.5rem;
}

/* ── Stats Widget Cards Hover ────────────────────────── */
.fi-wi-stats-overview-stat {
    transition: all 0.2s ease;
}

.fi-wi-stats-overview-stat:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ── Scrollbar Styling ───────────────────────────────── */
.fi-ta-content::-webkit-scrollbar {
    height: 6px;
}

.fi-ta-content::-webkit-scrollbar-track {
    background: transparent;
}

.fi-ta-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

:is(.dark) .fi-ta-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}


/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS
   ═══════════════════════════════════════════════════════ */

/* ── Global Mobile Fixes ─────────────────────────────── */
@media (max-width: 768px) {

    /* Main content - proper spacing */
    .fi-main {
        padding-inline: 0.75rem !important;
    }

    .fi-main-ctn {
        max-width: 100% !important;
    }

    /* Page header - stack actions below title */
    .fi-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding-bottom: 0.75rem;
    }

    .fi-header-heading {
        font-size: 1.125rem !important;
    }

    .fi-header-actions {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .fi-header-actions .fi-btn {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        font-size: 0.8125rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    /* Tabs - horizontal scroll */
    .fi-tabs-list {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 2px;
    }

    .fi-tabs-list::-webkit-scrollbar {
        display: none;
    }

    .fi-tabs-item {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        font-size: 0.8125rem !important;
    }

    /* Sections - reduce padding */
    .fi-section-content {
        padding: 0.75rem !important;
    }

    .fi-section-header {
        padding: 0.75rem !important;
    }

    /* Tables - better mobile display */
    .fi-ta-header-cell {
        font-size: 0.6875rem !important;
        padding: 0.5rem 0.375rem !important;
    }

    .fi-ta-cell {
        padding: 0.5rem 0.375rem !important;
        font-size: 0.75rem !important;
    }

    .fi-ta-actions .fi-icon-btn {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }

    /* Modals - full width on mobile */
    .fi-modal-window {
        max-width: calc(100vw - 1rem) !important;
        margin: 0.5rem !important;
    }

    /* Stats widgets - 2 columns on mobile */
    .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .fi-wi-stats-overview-stat {
        padding: 0.75rem !important;
    }

    .fi-wi-stats-overview-stat-value {
        font-size: 1.25rem !important;
    }

    .fi-wi-stats-overview-stat-label {
        font-size: 0.6875rem !important;
    }

    /* Breadcrumbs - hide on mobile */
    .fi-breadcrumbs {
        display: none !important;
    }

    .fi-section-header-heading {
        font-size: 0.9375rem !important;
    }

    /* Form grid - single column on mobile */
    .fi-fo-component-ctn.grid {
        grid-template-columns: 1fr !important;
    }

    /* Notification - fit screen */
    .fi-notification {
        max-width: calc(100vw - 1rem) !important;
    }
}

/* ── Small Mobile (< 480px) ──────────────────────────── */
@media (max-width: 480px) {

    .fi-main {
        padding-inline: 0.5rem !important;
    }

    .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: 1fr !important;
    }

    .fi-header-actions {
        flex-direction: column !important;
    }

    .fi-header-actions .fi-btn {
        width: 100%;
    }
}


/* ── Prevent iOS Input Zoom ──────────────────────────── */
@media (max-width: 768px) {
    select,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="search"],
    textarea {
        font-size: 16px !important;
    }
}


/* ── Safe Area for Notched Devices ───────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
    .fi-sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
