/**
 * POPUPS.CSS — Styles partagés pour les popups d'annonce (carte publique)
 * Porté depuis l'ancien carteetmenus, adapté à Yngredient.
 *
 * Identité dark/gold (compatible accordion/elegant/panneau qui dominent).
 * Pour les futurs templates clairs, à overrider via body.theme-XXX .popup { ... }
 */

.popups-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

/* Popup card — translucent dark avec bordure dorée + accent latéral selon le type */
.popup {
    position: fixed;
    pointer-events: auto;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.96), rgba(15, 15, 30, 0.96));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-left-width: 4px;
    border-radius: 8px;
    padding: 0.85rem 2.4rem 0.85rem 1.1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    margin: 0;
    max-width: 360px;
    min-width: 240px;
    color: #f0f0f0;
    font-family: Georgia, 'Cormorant Garamond', system-ui, serif;
    line-height: 1.45;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.popup--show {
    opacity: 1;
    transform: translateY(0);
}

/* Couleur de l'accent latéral selon le type */
.popup--info    { border-left-color: #3498db; }
.popup--success { border-left-color: #2ecc71; }
.popup--warning { border-left-color: #f1c40f; }
.popup--error   { border-left-color: #e74c3c; }

/* Position : 4 coins de l'écran (fixed avec marge) */
.popup--top-right    { top: 16px;    right: 16px; }
.popup--top-left     { top: 16px;    left:  16px; }
.popup--bottom-right { bottom: 16px; right: 16px; }
.popup--bottom-left  { bottom: 16px; left:  16px; }

/* Titre + message */
.popup-title {
    font-weight: 600;
    font-size: 1.02rem;
    margin: 0 0 0.4rem;
    color: #d4af37;
    letter-spacing: 0.5px;
}
.popup-message {
    margin: 0;
    font-size: 0.92rem;
    color: #e8e8e8;
}

/* Bouton fermer en haut-droite */
.popup-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    color: rgba(212, 175, 55, 0.7);
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.18s ease;
    font-family: inherit;
}
.popup-close:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
}

/* Mobile : popups un peu plus petits et collés aux bords */
@media (max-width: 640px) {
    .popup {
        max-width: calc(100vw - 24px);
        min-width: 0;
        padding: 0.7rem 2rem 0.7rem 0.9rem;
        font-size: 0.9rem;
    }
    .popup-title { font-size: 0.96rem; }
    .popup-message { font-size: 0.86rem; }
    .popup--top-right, .popup--top-left { top: 8px; }
    .popup--bottom-right, .popup--bottom-left { bottom: 8px; }
    .popup--top-right, .popup--bottom-right { right: 8px; left: auto; }
    .popup--top-left, .popup--bottom-left   { left: 8px;  right: auto; }
}
