/* ============================================
   STORAGILITY - Public Styles (Final)
   Version: 2.2.0
   Couleur principale: #3b82f6
   ============================================ */

/* Loader */
#ssb-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 9999;
}

.ssb-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Modal */
.ssb-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ssb-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ssb-modal-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 24px;
    position: relative;
}

.ssb-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.ssb-modal-body {
    padding: 24px;
}

.ssb-modal-close {
    color: #6b7280;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.ssb-modal-close:hover {
    color: #1a1a1a;
    background-color: #e5e7eb;
}

/* Toasts */
.ssb-error-toast,
.ssb-success-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    display: none;
    z-index: 10000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.3s ease-out;
    font-weight: 500;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ssb-error-toast {
    background-color: #dc2626;
    color: white;
}

.ssb-success-toast {
    background-color: #10b981;
    color: white;
}

/* Tooltip */
.ssb-tooltip-content {
    position: absolute;
    background: #1a1a1a;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
}

.ssb-tooltip-content:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .ssb-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .ssb-error-toast,
    .ssb-success-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}