/* =========================================================
   RolloutEmail SaaS Theme — Unified Shell + Blue Active Nav
   ========================================================= */

/* 1. Compact Sidebar Typography & Icons */
.fi-sidebar-item-label {
    font-size: 0.8125rem !important;
    /* 13px */
    font-weight: 400 !important;
}

.fi-sidebar-group-label {
    font-size: 0.6875rem !important;
    /* 11px */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600 !important;
    padding-left: 1rem !important;
}

.fi-sidebar-group-button {
    padding-left: 1rem !important;
}

.fi-sidebar-item-icon {
    width: 1.125rem !important;
    /* 18px */
    height: 1.125rem !important;
}

/* 2. Active & Hover Sidebar Nav */
.fi-sidebar-item.fi-sidebar-item-has-url>.fi-sidebar-item-btn:hover,
.fi-sidebar-item.fi-active>.fi-sidebar-item-btn {
    background: #5689eb !important;
}

/* Light Mode: White text/icon on blue active & hover nav */
html:not(.dark) .fi-sidebar-item.fi-sidebar-item-has-url>.fi-sidebar-item-btn:hover>.fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item.fi-sidebar-item-has-url>.fi-sidebar-item-btn:hover>.fi-icon,
html:not(.dark) .fi-sidebar-item.fi-active>.fi-sidebar-item-btn>.fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item.fi-active>.fi-sidebar-item-btn>.fi-icon {
    color: #ffffff !important;
}

/* Dark Mode: Dark text/icon on blue active & hover nav */
html.dark .fi-sidebar-item.fi-sidebar-item-has-url>.fi-sidebar-item-btn:hover>.fi-sidebar-item-label,
html.dark .fi-sidebar-item.fi-sidebar-item-has-url>.fi-sidebar-item-btn:hover>.fi-icon,
html.dark .fi-sidebar-item.fi-active>.fi-sidebar-item-btn>.fi-sidebar-item-label,
html.dark .fi-sidebar-item.fi-active>.fi-sidebar-item-btn>.fi-icon {
    color: #131c31 !important;
}

.fi-sidebar-item-button {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    padding-left: 1rem !important;
    padding-right: 0.875rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
    transition: background-color 150ms ease, color 150ms ease;
}

/* 3. Light Mode: Single Unified Shell (Sidebar + Header + Body) */
html:not(.dark) .fi-sidebar,
html:not(.dark) .fi-sidebar-header,
html:not(.dark) .fi-topbar,
html:not(.dark) .fi-topbar>nav,
html:not(.dark) .fi-body,
html:not(.dark) .fi-main {
    background-color: #f6f8fd !important;
    border: none !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
}

/* 4. Active Sidebar Nav: Solid Blue Pill + Crisp White Label & Icon */
.fi-sidebar-item.fi-active>.fi-sidebar-item-button,
.fi-sidebar-item-active>.fi-sidebar-item-button {
    background-color: #5689eb !important;
    box-shadow: 0 2px 8px rgba(86, 137, 235, 0.25) !important;
}

.fi-sidebar-item.fi-active>.fi-sidebar-item-button .fi-sidebar-item-label,
.fi-sidebar-item-active>.fi-sidebar-item-button .fi-sidebar-item-label,
.fi-sidebar-item.fi-active>.fi-sidebar-item-button .fi-sidebar-item-icon,
.fi-sidebar-item-active>.fi-sidebar-item-button .fi-sidebar-item-icon,
.fi-sidebar-item.fi-active>.fi-sidebar-item-button svg,
.fi-sidebar-item-active>.fi-sidebar-item-button svg {
    color: #ffffff !important;
}

/* Subtle Hover on Inactive Sidebar Items */
html:not(.dark) .fi-sidebar-item:not(.fi-active):not(.fi-sidebar-item-active)>.fi-sidebar-item-button:hover {
    background-color: rgba(86, 137, 235, 0.08) !important;
}

/* 5. Overview Widget Stats */
.fi-wi-stats-overview-stat {
    --tw-ring-shadow: 0 0 #0000 !important;
}

.fi-wi-stats-overview-stat-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* 6. Dark Mode: Single Unified Dark Shell */
html.dark .fi-sidebar,
html.dark .fi-sidebar-header,
html.dark .fi-topbar,
html.dark .fi-topbar>nav,
html.dark .fi-body,
html.dark .fi-main {
    background-color: #0b1120 !important;
    border: none !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
}

/* 7. Tables */
.fi-ta-ctn {
    border: none !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    border-radius: 0.75rem !important;
}

.fi-ta-header-cell-label {
    font-size: 0.75rem !important;
    /* 12px */
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

html:not(.dark) .fi-ta-row:hover {
    background-color: #f8faff !important;
}

html.dark .fi-ta-row:hover {
    background-color: rgba(86, 137, 235, 0.06) !important;
}

.fi-ta-text-item-label,
.fi-ta-col-wrp {
    font-size: 0.8125rem !important;
    /* 13px */
    line-height: 1.25rem !important;
}

.fi-ta-text-description {
    font-size: 0.75rem !important;
    /* 12px */
}

.fi-ta-actions .fi-link-label,
.fi-ta-actions .fi-btn-label {
    font-size: 0.75rem !important;
    /* 12px */
}

.fi-ta-cell>div {
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
}

/* 8. Form Inputs, Selects, Textareas & Field Wrappers (~32px) */
.fi-fo-field-label-content {
    font-size: 0.75rem !important;
    /* 12px */
    line-height: 1rem !important;
    font-weight: 600 !important;
}

.fi-input-wrp {
    min-height: 2rem !important;
    /* 32px */
    border-radius: 0.5rem !important;
    /* 8px */
}

.fi-input-wrp input:not([type="checkbox"]):not([type="radio"]),
.fi-input-wrp select {
    font-size: 0.8125rem !important;
    /* 13px */
    line-height: 1.5rem !important;
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
    padding-left: 0.6875rem !important;
    padding-right: 0.6875rem !important;
}

.fi-input-wrp textarea {
    font-size: 0.8125rem !important;
    /* 13px */
    line-height: 1.2rem !important;
    padding: 0.45rem 0.6875rem !important;
}

.fi-input-wrp-prefix,
.fi-input-wrp-suffix {
    font-size: 0.8125rem !important;
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
}

.fi-input-wrp .fi-icon-btn {
    width: 1.625rem !important;
    /* 26px */
    height: 1.625rem !important;
}

.fi-fo-field-wrp-hint,
.fi-fo-field-wrp-error-message {
    font-size: 0.75rem !important;
    /* 12px */
}

/* 9. Action & Icon Buttons (~36px) */
.fi-btn {
    min-height: 2.25rem !important;
    /* 36px */
    font-size: 0.8125rem !important;
    /* 13px */
    line-height: 1.125rem !important;
    padding: 0.5rem 0.875rem !important;
    border-radius: 0.5rem !important;
    gap: 0.375rem !important;
    text-transform: capitalize;
}

.fi-btn-icon {
    width: 1rem !important;
    /* 16px */
    height: 1rem !important;
}

.fi-btn-size-sm {
    min-height: 1.875rem !important;
    /* 30px */
    font-size: 0.75rem !important;
    /* 12px */
    padding: 0.375rem 0.6875rem !important;
}

.fi-icon-btn {
    width: 2rem !important;
    height: 2rem !important;
    border-radius: 0.5rem !important;
}

.fi-icon-btn-icon {
    width: 1.125rem !important;
    /* 18px */
    height: 1.125rem !important;
}

/* 10. Match Custom Blade Action Buttons to Filament Theme */
.re-media-wrapper .re-btn-primary,
.re-media-wrapper .re-btn-danger,
.re-tpl-wrapper .re-btn-primary,
.re-tpl-wrapper .re-btn-secondary,
.re-tpl-wrapper .re-btn-danger {
    min-height: 2.25rem !important;
    /* 36px */
    font-size: 0.8125rem !important;
    /* 13px */
    line-height: 1.125rem !important;
    padding: 0.5rem 0.875rem !important;
    border-radius: 0.5rem !important;
    gap: 0.375rem !important;
    text-transform: capitalize;
}

.re-media-wrapper .re-btn-primary svg,
.re-media-wrapper .re-btn-danger svg,
.re-tpl-wrapper .re-btn-primary svg,
.re-tpl-wrapper .re-btn-secondary svg,
.re-tpl-wrapper .re-btn-danger svg {
    width: 1rem !important;
    /* 16px */
    height: 1rem !important;
    /* 16px */
}