﻿/* ============================================================
   Bouquinours Preview Modal — v5.3.0
   ============================================================ */

.bq-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: bqModalFadeIn 0.2s ease;
}

.bq-modal-overlay.bq-modal-closing {
    animation: bqModalFadeOut 0.25s ease forwards;
}

@keyframes bqModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes bqModalFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.bq-modal-panel {
    background: #fff;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    animation: bqModalSlideUp 0.25s ease;
}

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

.bq-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    z-index: 2;
    transition: background 0.2s, color 0.2s;
}
.bq-modal-close:hover { background: #e2e8f0; color: #0f172a; }
.bq-modal-close:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }

.bq-modal-header {
    padding: 32px 32px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.bq-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 40px 8px 0;
    font-family: Inter, system-ui, sans-serif;
}

.bq-modal-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Style tabs */
.bq-preview-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 32px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.bq-preview-tab {
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Inter, system-ui, sans-serif;
}

.bq-preview-tab:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.bq-preview-tab.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.bq-preview-tab:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Images preview grid */
.bq-preview-images {
    padding: 24px 32px;
    min-height: 200px;
}

.bq-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bq-preview-item {
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 3/4;
}

.bq-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.bq-preview-img:hover {
    transform: scale(1.03);
}

/* Spinner */
.bq-preview-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #64748b;
    font-size: 0.9rem;
}

.bq-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: bqSpin 0.8s linear infinite;
}

@keyframes bqSpin {
    to { transform: rotate(360deg); }
}

.bq-preview-empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
}

/* Footer */
.bq-modal-footer {
    padding: 20px 32px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 640px) {
    .bq-modal-panel {
        border-radius: 16px;
        max-height: 95vh;
    }
    .bq-modal-header,
    .bq-preview-images,
    .bq-preview-tabs,
    .bq-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .bq-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bq-modal-footer {
        justify-content: center;
    }
}
