/*
 * Fila Bridge CSS
 * Maps old Synapsis theme utility classes to Fila/Bootstrap 5 equivalents
 * so we can migrate the theme without touching every blade template at once.
 */

/* ===== Button Variants (double-dash → single-dash equivalents) ===== */
.btn { --btn-color: #fff; }

.btn--primary {
    background-color: #4634ff !important;
    border: 1px solid #4634ff !important;
    color: var(--btn-color) !important;
}
.btn--primary:hover, .btn--primary:active, .btn--primary:focus, .btn--primary:focus-visible {
    background-color: #1801ff !important;
    border-color: #1801ff !important;
    color: var(--btn-color) !important;
}

.btn--success {
    background-color: #28c76f !important;
    border: 1px solid #28c76f !important;
    color: var(--btn-color) !important;
}
.btn--success:hover, .btn--success:active, .btn--success:focus {
    background-color: #1f9d57 !important;
    border-color: #1f9d57 !important;
}

.btn--danger {
    background-color: #eb2222 !important;
    border: 1px solid #eb2222 !important;
    color: var(--btn-color) !important;
}
.btn--danger:hover, .btn--danger:active, .btn--danger:focus {
    background-color: #c81212 !important;
    border-color: #c81212 !important;
}

.btn--warning {
    background-color: #ff9f43 !important;
    border: 1px solid #ff9f43 !important;
    color: var(--btn-color) !important;
}
.btn--warning:hover, .btn--warning:active, .btn--warning:focus {
    background-color: #ff8510 !important;
    border-color: #ff8510 !important;
}

.btn--info {
    background-color: #1e9ff2 !important;
    border: 1px solid #1e9ff2 !important;
    color: var(--btn-color) !important;
}
.btn--info:hover, .btn--info:active, .btn--info:focus {
    background-color: #0c84d1 !important;
    border-color: #0c84d1 !important;
}

.btn--dark {
    background-color: #10163a !important;
    border: 1px solid #10163a !important;
    color: var(--btn-color) !important;
}
.btn--dark:hover, .btn--dark:active, .btn--dark:focus {
    background-color: #050712 !important;
    border-color: #050712 !important;
}

/* Outline Buttons */
.btn-outline--primary {
    color: #4634ff !important;
    border-color: #4634ff !important;
}
.btn-outline--primary:hover, .btn-outline--primary:active, .btn-outline--primary:focus-visible {
    background-color: #4634ff !important;
    color: var(--btn-color) !important;
}

.btn-outline--success {
    color: #28c76f !important;
    border-color: #28c76f !important;
}
.btn-outline--success:hover, .btn-outline--success:active, .btn-outline--success:focus-visible {
    background-color: #28c76f !important;
    color: var(--btn-color) !important;
}

.btn-outline--danger {
    color: #eb2222 !important;
    border-color: #eb2222 !important;
}
.btn-outline--danger:hover, .btn-outline--danger:active, .btn-outline--danger:focus-visible {
    background-color: #eb2222 !important;
    color: var(--btn-color) !important;
}

.btn-outline--warning {
    color: #ff9f43 !important;
    border-color: #ff9f43 !important;
}
.btn-outline--warning:hover, .btn-outline--warning:active, .btn-outline--warning:focus-visible {
    background-color: #ff9f43 !important;
    color: var(--btn-color) !important;
}

.btn-outline--info {
    color: #1e9ff2 !important;
    border-color: #1e9ff2 !important;
}
.btn-outline--info:hover, .btn-outline--info:active, .btn-outline--info:focus-visible {
    background-color: #1e9ff2 !important;
    color: var(--btn-color) !important;
}

.btn-outline--dark {
    color: #10163a !important;
    border-color: #10163a !important;
}
.btn-outline--dark:hover, .btn-outline--dark:active, .btn-outline--dark:focus-visible {
    background-color: #10163a !important;
    color: var(--btn-color) !important;
}

/* ===== Badge Variants ===== */
.badge--warning, .badge--success, .badge--primary, .badge--danger,
.badge--info, .badge--dark, .badge--pending {
    border-radius: 999px;
    padding: 2px 15px;
    font-size: 0.75rem !important;
    font-weight: 400;
}

.badge--warning  { background-color: rgba(255,159,67,0.1); border: 1px solid #ff9f43; color: #ff9f43; }
.badge--success  { background-color: rgba(40,199,111,0.1); border: 1px solid #28c76f; color: #28c76f; }
.badge--danger   { background-color: rgba(234,84,85,0.1); border: 1px solid #eb2222; color: #eb2222; }
.badge--primary  { background-color: rgba(115,103,240,0.1); border: 1px solid #4634ff; color: #4634ff; }
.badge--dark     { background-color: rgba(0,0,0,0.1); border: 1px solid #000; color: #000; }
.badge--info     { background-color: rgba(30,159,242,0.1); border: 1px solid #1e9ff2; color: #1e9ff2; }
.badge--pending  { background-color: rgba(255,159,67,0.1); border: 1px solid #ff9f43; color: #ff9f43; }

/* ===== Background Color Utilities ===== */
.bg--primary { background-color: #4634ff !important; }
.bg--success { background-color: #28c76f !important; }
.bg--warning { background-color: #ff9f43 !important; }
.bg--danger  { background-color: #eb2222 !important; }
.bg--info    { background-color: #1e9ff2 !important; }
.bg--white   { background-color: #fff !important; color: inherit; }
.bg--purple  { background-color: #9c27b0 !important; }
.bg--transparent { background-color: transparent !important; }

/* ===== Text Utilities ===== */
.text--primary { color: #4634ff !important; }
.text--dark    { color: #10163a !important; }
.text--small   { font-size: 0.75rem !important; }

/* ===== Utility Classes ===== */
.h-45 { height: 45px; }
a.btn.h-45 { line-height: 27.5px; }
.mb-30 { margin-bottom: 30px; }
.b-radius--10 { border-radius: 10px !important; }

.box--shadow1 { box-shadow: 0px 5px 26px -5px #cdd4e7 !important; }
.box--shadow3, .box-shadow3 { box-shadow: 0 3px 5px 0 rgba(18,38,63,0.2) !important; }

.page-title {
    font-size: 1.125rem;
    display: inline-block;
}

/* ===== Form Group (removed in Bootstrap 5) ===== */
.form-group {
    margin-bottom: 1rem;
}

/* ===== Button Group ===== */
.button--group { margin: -5px -15px; }
.button--group .btn { margin: 2px 3px; }

/* ===== Common Button (auth pages) ===== */
.cmn-btn {
    background-color: #3d2bfb;
    color: #fff;
    height: 50px;
    border: none;
}
.cmn-btn:hover, .cmn-btn:active {
    background-color: #2916ed !important;
    color: #fff !important;
}

/* ===== Long Text ===== */
.long-text {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Primary Layer (topnav buttons) ===== */
.primary--layer {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid #e6eaf2;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #64748b;
}
.primary--layer:hover { background: #f1f5f9; }
.primary--layer i { color: #64748b !important; font-size: 20px; }
.primary--layer a { color: inherit; text-decoration: none; display: flex; align-items: center; justify-content: center; }

/* ===== Notification Bell ===== */
.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid #e6eaf2;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.notification-bell:hover { background: #f1f5f9; }
.notification-count {
    position: absolute;
    top: 2px;
    right: 2px;
    height: 17px;
    width: 17px;
    background: #eb2222;
    font-size: 10px;
    color: #fff;
    border-radius: 50px;
    line-height: 17px;
    text-align: center;
}

/* ===== Icon Animation ===== */
.icon-left-right {
    animation: iconLeftRight 0.5s ease-in-out infinite alternate;
}
@keyframes iconLeftRight {
    0%   { transform: rotate(-10deg); }
    100% { transform: rotate(10deg); }
}

/* ===== Dropdown Menu Styles ===== */
.dropdown-menu.dropdown-menu--md { min-width: 18rem; }

.dropdown-menu__header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}
.dropdown-menu__header .caption { font-size: 0.75rem; font-weight: 700; }
.dropdown-menu__header p { font-size: 0.75rem; }

.dropdown-menu__body {
    max-height: 270px;
    overflow-y: auto;
}
.dropdown-menu__body::-webkit-scrollbar { width: 4px; }
.dropdown-menu__body::-webkit-scrollbar-thumb { background-color: rgba(7,18,81,0.4); }

.dropdown-menu__item {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
    text-decoration: none;
    color: inherit;
}
.dropdown-menu__item:hover { background-color: #f7f7f7; }

.dropdown-menu__footer { border-top: 1px solid #e5e5e5; }
.dropdown-menu__footer .view-all-message {
    font-size: 0.75rem;
    display: block;
    padding: 15px;
    text-align: center;
    color: #34495e;
    font-weight: 600;
    text-decoration: none;
}
.dropdown-menu__footer .view-all-message:hover { color: #4634ff; }

/* ===== Notification Items in Navbar ===== */
.navbar-notifi {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}
.navbar-notifi__right .notifi__title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2px;
}
.navbar-notifi__right .time {
    font-size: 0.75rem;
    color: #64748b;
}
.empty-notification img { max-width: 120px; opacity: 0.6; }

/* ===== Context Selects (Topnav) ===== */
.synp-context-form { margin: 0; }
.synp-context-select {
    min-width: 200px;
    max-width: 300px;
    background-color: #fff;
    color: #1f2937;
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    height: 38px;
    padding: 0 30px 0 12px;
    font-weight: 500;
    font-size: 0.85rem;
}
.synp-context-select:focus {
    border-color: #0f79f3;
    box-shadow: 0 0 0 0.2rem rgba(15,121,243,0.15);
}
.synp-context-select:disabled { opacity: 0.75; }
.synp-context-li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ===== User Profile Menu ===== */
.synp-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.synp-user-trigger::after { display: none; }

.synp-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.synp-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.synp-user-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #28c76f;
    border: 2px solid #fff;
    position: absolute;
    bottom: 0;
    right: 0;
}
.synp-user-arrow i { font-size: 14px; color: #64748b; }

.synp-user-menu {
    width: 280px;
    border-radius: 12px;
    overflow: hidden;
}
.synp-user-menu__header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: #fff;
}
.synp-user-menu__avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
}
.synp-user-menu__avatar img { width: 100%; height: 100%; object-fit: cover; }
.synp-user-menu__name { font-size: 1rem; font-weight: 600; color: #1f2937; }

.synp-user-menu__body {
    padding: 8px;
    background: #fff;
    border-top: 1px solid #e6eaf2;
}
.synp-user-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #334155;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
}
.synp-user-menu__item i { font-size: 20px; color: #0f79f3; }
.synp-user-menu__item:hover { background: #f1f5f9; color: #0f172a; }
.synp-user-menu__item--danger i { color: #eb2222; }

/* ===== Nav Action Buttons ===== */
.synp-nav-action {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e6eaf2;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.synp-nav-action:hover { background: #f1f5f9; }
.synp-nav-action i { color: #64748b !important; font-size: 18px; }

/* ===== Widget Seven (Dashboard) ===== */
.widget-seven {
    border: 1px solid var(--color, #e6eaf2);
    border-radius: 8px;
    box-shadow: 0 0 4px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.06);
    background-color: #fff !important;
    padding: 20px 18px;
    display: flex;
    gap: 5px;
    justify-content: space-between;
    height: 100%;
}
.widget-seven.outline { border-color: #fff; }
.widget-seven .widget-seven__content {
    display: flex;
    gap: 16px;
    align-items: center;
}
.widget-seven .widget-seven__content-icon {
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.widget-seven .widget-seven__content-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color);
    z-index: -1;
    opacity: 0.2;
    border-radius: 4px;
}
.widget-seven.outline .widget-seven__content-icon::after {
    background-color: #fff !important;
    border: 1px solid var(--color);
    opacity: 1;
}
.widget-seven .widget-seven__content-icon .icon {
    color: var(--color);
    font-size: 25px;
}
.widget-seven .widget-seven__arrow {
    align-self: center;
    color: #000;
    font-size: 14px;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.widget-seven .widget-seven__content-title,
.widget-seven .widget-seven__content-subheading {
    font-size: 14px;
    font-weight: 500;
    color: #34495e;
}
.widget-seven .widget-seven__content-amount {
    color: #34495e;
    font-size: 27px;
    font-weight: 600;
}

/* ===== Widget Card (Dashboard grid) ===== */
.widget-card {
    border: 0;
    width: calc(100% / 2);
    padding: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: transparent !important;
    border-bottom: 1px solid rgba(7,18,81,0.07);
    border-left: 1px solid rgba(7,18,81,0.07);
}
.widget-card:hover { background-color: #f8f8f8 !important; }
.widget-card .widget-card-link {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9;
}
.widget-card .widget-card-arrow {
    height: 24px;
    width: 24px;
    display: grid;
    place-content: center;
    font-size: 16px;
    border-radius: 50%;
    color: #000;
    flex-shrink: 0;
}
.widget-card:nth-of-type(3),
.widget-card:nth-of-type(4) { border-bottom: 0; }
.widget-card:nth-of-type(1),
.widget-card:nth-of-type(3) { border-left: 0; }
.widget-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.widget-card-icon {
    flex-shrink: 0;
    height: 50px;
    width: 50px;
    font-size: 20px;
    display: grid;
    place-content: center;
    color: var(--color, #000);
    position: relative;
    z-index: 1;
}
.widget-card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--color, #000);
    opacity: 0.2;
    border-radius: 6px;
}
.widget-card-amount {
    font-size: 14px;
    font-weight: 400;
    color: rgb(14,23,38);
    line-height: 1;
    margin-bottom: 6px;
}
.widget-card-title {
    color: rgba(136,142,168,1);
    display: block;
    line-height: 1;
    font-size: 12px;
}

/* ===== Menu Badge (sidebar counters) ===== */
.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    padding: 0 6px;
}

/* ===== Table Compatibility ===== */
table.table--light thead th {
    background-color: #ffb637;
    color: #111827;
    font-weight: 600;
    font-size: 0.85rem;
}
.table-responsive--md { overflow-x: auto; }

/* ===== View Toggle Separator ===== */
.synp-view-toggle__separator {
    height: 28px;
    border-left: 2px solid #d0d7e2;
    margin: 0 8px;
}

/* ===== Breadcrumb Nav ===== */
.breadcrumb-nav-open {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
}

/* ===== Search List (topnav search results) ===== */
.search-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    max-height: 300px;
    overflow-y: auto;
    z-index: 999;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.search-list.show,
.search-list:not(:empty) { display: block; }
.search-list li {
    padding: 8px 14px;
}
.search-list li a {
    display: block;
    color: #334155;
    text-decoration: none;
    font-size: 0.85rem;
}
.search-list li a:hover,
.search-list li:hover { background: #f1f5f9; }
.empty-search { padding: 20px; }
.empty-search img { max-width: 120px; opacity: 0.6; }

/* ===== Required Label ===== */
label.required::after {
    content: '*';
    color: #dc3545 !important;
    margin-left: 2px;
}

/* ===== Image Upload ===== */
.image-upload-wrapper {
    height: 280px;
    position: relative;
}
.image-upload-preview {
    width: 100%;
    height: 100%;
    display: block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border-radius: 10px;
    border: 3px solid #f1f1f1;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.25);
}
.image-upload-input-wrapper {
    position: absolute;
    display: inline-flex;
    bottom: -14px;
    right: -7px;
}
.image-upload-input-wrapper input {
    width: 0;
    opacity: 0;
}
.image-upload-input-wrapper label {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    border: 2px solid #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    background-color: #4634ff;
    color: #fff;
}

/* ===== Card adjustments ===== */
.card-footer { background-color: transparent; }
