/**
 * Social Proof Toast - Estilos
 *
 * Diseño adaptado al estilo de The One Pro Therapy
 * Optimizado para UX móvil
 *
 * @version 1.0.0
 */

/* ================================================
   CONTENEDOR PRINCIPAL DEL TOAST
   ================================================ */

#social-proof-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #FDF8E8 0%, #FEFBF0 100%);
    color: #261C14;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow:
        0 4px 20px rgba(191, 137, 36, 0.15),
        0 8px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(191, 137, 36, 0.2);
    z-index: 9999;
    max-width: 380px;
    min-width: 300px;

    /* Animación de entrada/salida */
    opacity: 0;
    transform: translateX(-120%) scale(0.9);
    visibility: hidden;
    transition:
        opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility 0.4s;

    /* Interactividad */
    cursor: pointer;
    user-select: none;
}

/* Estado visible */
#social-proof-toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    visibility: visible;
}

/* Efecto hover sutil */
#social-proof-toast:hover {
    box-shadow:
        0 6px 25px rgba(191, 137, 36, 0.2),
        0 10px 45px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px) scale(1.02);
}

/* ================================================
   CONTENIDO DEL TOAST
   ================================================ */

#toast-content {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

/* ================================================
   BANDERA
   ================================================ */

.toast-flag {
    width: 36px;
    height: 27px;
    border-radius: 4px;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    object-fit: cover;
    flex-shrink: 0;
}

/* ================================================
   TEXTO
   ================================================ */

.toast-text {
    flex: 1;
    line-height: 1.4;
}

.toast-text p {
    margin: 0;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
}

.toast-text p strong {
    color: #BF8924;
    font-weight: 700;
    font-size: 15px;
}

.toast-action {
    color: #4A4A4A;
    margin-top: 2px !important;
    font-size: 13px !important;
}

.toast-time {
    font-size: 12px !important;
    color: #999;
    margin-top: 4px !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toast-time i {
    font-size: 11px;
    opacity: 0.7;
}

/* ================================================
   BOTÓN DE CERRAR
   ================================================ */

.toast-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #BF8924;
    color: white;
    border: 2px solid #FDF8E8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(191, 137, 36, 0.3);
    opacity: 0;
    transform: scale(0);
}

#social-proof-toast:hover .toast-close {
    opacity: 1;
    transform: scale(1);
}

.toast-close:hover {
    background: #261C14;
    transform: scale(1.1);
}

.toast-close:active {
    transform: scale(0.95);
}

/* ================================================
   RESPONSIVE - TABLET
   ================================================ */

@media (max-width: 768px) {
    #social-proof-toast {
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-width: none;
        min-width: unset;
        padding: 14px 16px;
    }

    .toast-flag {
        width: 32px;
        height: 24px;
    }

    .toast-text p {
        font-size: 13px;
    }

    .toast-text p strong {
        font-size: 14px;
    }

    .toast-action {
        font-size: 12px !important;
    }

    .toast-time {
        font-size: 11px !important;
    }
}

/* ================================================
   RESPONSIVE - MOBILE
   ================================================ */

@media (max-width: 480px) {
    #social-proof-toast {
        /* Posición superior para evitar ocultar elementos importantes */
        bottom: auto;
        top: 80px;
        left: 12px;
        right: 12px;
        padding: 12px 14px;
        border-radius: 10px;
    }

    /* Animación desde arriba en móvil */
    #social-proof-toast {
        transform: translateY(-120%) scale(0.9);
    }

    #social-proof-toast.show {
        transform: translateY(0) scale(1);
    }

    #toast-content {
        gap: 12px;
    }

    .toast-flag {
        width: 28px;
        height: 21px;
    }

    .toast-text p {
        font-size: 12px;
    }

    .toast-text p strong {
        font-size: 13px;
    }

    .toast-action {
        font-size: 11px !important;
        margin-top: 1px !important;
    }

    .toast-time {
        font-size: 10px !important;
        margin-top: 3px !important;
    }

    .toast-close {
        width: 22px;
        height: 22px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
}

/* ================================================
   ANIMACIÓN DE PULSO (OPCIONAL)
   ================================================ */

@keyframes pulse-border {
    0%, 100% {
        border-color: rgba(191, 137, 36, 0.2);
    }
    50% {
        border-color: rgba(191, 137, 36, 0.4);
    }
}

#social-proof-toast.show {
    animation: pulse-border 3s ease-in-out infinite;
}

/* ================================================
   ACCESIBILIDAD
   ================================================ */

/* Focus para navegación por teclado */
#social-proof-toast:focus-visible {
    outline: 2px solid #BF8924;
    outline-offset: 2px;
}

.toast-close:focus-visible {
    outline: 2px solid white;
    outline-offset: 1px;
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    #social-proof-toast,
    #social-proof-toast.show,
    .toast-close {
        transition: none;
        animation: none;
    }
}

/* ================================================
   MODO OSCURO (OPCIONAL)
   ================================================ */

@media (prefers-color-scheme: dark) {
    #social-proof-toast {
        background: linear-gradient(135deg, #2D2416 0%, #3A2E1C 100%);
        color: #F5F5F5;
        border-color: rgba(191, 137, 36, 0.3);
    }

    .toast-text p strong {
        color: #D4A356;
    }

    .toast-action {
        color: #C0C0C0;
    }

    .toast-time {
        color: #888;
    }

    .toast-close {
        background: #D4A356;
        border-color: #2D2416;
    }

    .toast-close:hover {
        background: #BF8924;
    }
}

/* ================================================
   PRINT (OCULTAR EN IMPRESIÓN)
   ================================================ */

@media print {
    #social-proof-toast {
        display: none !important;
    }
}
