/* ============================================
   Floating Action Button (FAB)
   ============================================
   Bottom-right floating button for quick access
   to import service on all store pages.
   Hidden on plugin pages via .bim-page body class.
   ============================================ */

/* ========================================
   Hide on plugin pages
   ======================================== */

.bim-page .bim-fab-container {
    display: none !important;
}

/* ========================================
   FAB Container
   ======================================== */

.bim-fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
    font-family: var(--bim-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif);
}

/* ========================================
   FAB Button
   ======================================== */

.bim-fab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 52px;
    padding: 0 1.25rem;
    background: var(--bim-bolivia-red, #E31E24);
    color: #ffffff !important;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(227, 30, 36, 0.4), 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    position: relative;
}

.bim-fab:hover {
    background: var(--bim-bolivia-red-hover, #c41a1f) !important;
    box-shadow: 0 6px 24px rgba(227, 30, 36, 0.5), 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    color: #ffffff !important;
    text-decoration: none;
}

.bim-fab:active {
    transform: translateY(0);
}

.bim-fab--active {
    background: #1A1A1A !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Icon */
.bim-fab-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Label */
.bim-fab-label {
    white-space: nowrap;
}

/* Badge (order count) */
.bim-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ffffff;
    color: var(--bim-bolivia-red, #E31E24);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ========================================
   FAB Dropdown
   ======================================== */

.bim-fab-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 300px;
    background: #ffffff;
    border-radius: var(--bim-radius, 0.75rem);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Dropdown header */
.bim-fab-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #1A1A1A;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.bim-fab-dropdown-header .material-symbols-outlined {
    font-size: 18px;
    color: var(--bim-bolivia-red, #E31E24);
}

/* Order list */
.bim-fab-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.bim-fab-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.bim-fab-order-item:last-child {
    border-bottom: none;
}

.bim-fab-order-item:hover {
    background: #f8fafc;
    text-decoration: none;
}

.bim-fab-order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.bim-fab-order-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.bim-fab-order-status {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bim-fab-order-arrow {
    font-size: 18px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Dropdown footer */
.bim-fab-dropdown-footer {
    padding: 0.625rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.bim-fab-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bim-bolivia-red, #E31E24) !important;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.bim-fab-view-all:hover {
    opacity: 0.8;
    text-decoration: none;
}

.bim-fab-view-all .material-symbols-outlined {
    font-size: 16px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .bim-fab-container {
        bottom: 16px;
        right: 16px;
    }

    .bim-fab {
        height: 48px;
        padding: 0 1rem;
        font-size: 0.75rem;
    }

    .bim-fab-icon {
        width: 20px;
        height: 20px;
    }

    .bim-fab-dropdown {
        width: 280px;
        right: 0;
    }
}

/* Very small screens — hide label, show icon only */
@media (max-width: 380px) {
    .bim-fab-label {
        display: none;
    }

    .bim-fab {
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}
