/* Vermi Floating Widget Styles - B2B Electrical Distribution Focus */
.vermi-fw-widget {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #dee2e6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 380px;
    transition: all 0.3s ease;
}

/* Positions */
.vermi-fw-bottom-right {
    bottom: 20px;
    right: 20px;
}

.vermi-fw-bottom-left {
    bottom: 20px;
    left: 20px;
}

.vermi-fw-top-right {
    top: 20px;
    right: 20px;
}

.vermi-fw-top-left {
    top: 20px;
    left: 20px;
}

/* Header */
.vermi-fw-header {
    background: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.vermi-fw-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.vermi-fw-toggle {
    display: flex;
    gap: 5px;
}

.vermi-fw-toggle-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #6c757d;
}

.vermi-fw-toggle-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.vermi-fw-toggle-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Font Awesome Icons */
.vermi-fw-icon-cube::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: "\f1b2";
    /* cube icon */
}

.vermi-fw-icon-weight::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: "\f496";
    /* weight icon */
}

.vermi-fw-icon-shipping::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: "\f0d1";
    /* shipping fast */
}

.vermi-fw-icon-container::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: "\f4d8";
    /* container storage */
}

/* Content */
.vermi-fw-content {
    padding: 15px;
}

.vermi-fw-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.vermi-fw-label {
    color: #6c757d;
    font-weight: 500;
}

.vermi-fw-value {
    color: #495057;
    font-weight: 600;
}

/* Progress Bars */
.vermi-fw-progress-container {
    margin: 12px 0;
}

.vermi-fw-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
    color: #6c757d;
}

.vermi-fw-progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.vermi-fw-progress .progress-bar {
    transition: width 0.3s ease;
}

/* Status Colors */
.vermi-fw-status.empty {
    color: #6c757d;
}

.vermi-fw-status.normal {
    color: #28a745;
}

.vermi-fw-status.warning {
    color: #ffc107;
    font-weight: 600;
}

.vermi-fw-status.full {
    color: #dc3545;
    font-weight: 600;
}

/* Shipping Options */
.vermi-fw-shipping {
    margin-top: 15px;
    padding: 15px;
    border-top: 1px solid #dee2e6;
}

.vermi-fw-shipping-options .form-check {
    margin-bottom: 8px;
    font-size: 12px;
    padding-left: 0;
}

.vermi-fw-shipping-options .form-check-input {
    margin-top: 0.2em;
}

.vermi-fw-shipping-options .form-check-label {
    margin-left: 5px;
}

.vermi-fw-shipping-options .form-check-label small {
    color: #6c757d;
    display: block;
    margin-top: 2px;
}

/* Footer */
.vermi-fw-footer {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    text-align: center;
    font-size: 11px;
}

/* Alert Styles */
.vermi-fw-alert {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Drag Styles */
.vermi-fw-dragging {
    opacity: 0.9;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
    transition: none !important;
    z-index: 10000;
}

.vermi-fw-header:active {
    cursor: grabbing;
}

/* B2B Specific Styles */
.vermi-fw-b2b-badge {
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .vermi-fw-widget {
        max-width: 280px;
        bottom: 10px !important;
        right: 10px !important;
        left: auto !important;
        top: auto !important;
    }
}

/* Bootstrap Modal Overrides */
#vermiFwAlertModal .modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}


/* Visual Indicators */
.vermi-fw-progress-indicator {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 3px;
}

.vermi-fw-indicator-green {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vermi-fw-indicator-yellow {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.vermi-fw-indicator-orange {
    background-color: #ffe5d0;
    color: #b35a00;
    border: 1px solid #ffd8b3;
}

.vermi-fw-indicator-red {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.vermi-fw-indicator-gray {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Suggestion styling */
.vermi-fw-suggestion {
    text-align: center;
    margin-top: 8px;
    padding: 4px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.vermi-fw-collapse-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #6c757d;
}

.card {
    min-width: 100% !important;
}

/* Footer Style (Gmail Chat) */
.vermi-fw-style-footer {
    bottom: 0 !important;
    left: auto !important;
    top: auto !important;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: none;
    transition: transform 0.1s linear;
    /* Faster transition for dragging */
}

.vermi-fw-widget.vermi-fw-collapsed .vermi-fw-content,
.vermi-fw-widget.vermi-fw-collapsed .vermi-fw-footer {
    display: none !important;
}

.vermi-fw-widget.vermi-fw-collapsed {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
}

.vermi-fw-widget.vermi-fw-collapsed .vermi-fw-header {
    border-radius: 8px;
    /* Round all corners when collapsed */
    border-bottom: none;
}

.vermi-fw-style-footer.vermi-fw-collapsed {
    transform: translateY(calc(100% - 45px));
    /* Keep header visible */
}

.vermi-fw-drag-handle {
    cursor: grab;
    color: #adb5bd;
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.vermi-fw-drag-handle:hover {
    color: #495057;
}

.vermi-fw-drag-handle:active {
    cursor: grabbing;
}

/* Hide position classes for footer style to avoid conflict */
.vermi-fw-style-footer.vermi-fw-bottom-right,
.vermi-fw-style-footer.vermi-fw-bottom-left,
.vermi-fw-style-footer.vermi-fw-top-right,
.vermi-fw-style-footer.vermi-fw-top-left {
    /* Positions are handled by JS/Dragging */
    bottom: 0;
}