/* ============================================================
   GonzurqUI - Toasts & Confirm Modal Styles
   ============================================================ */

/* ── Toast Container ── */
#gonzurq-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 40px);
}

/* ── Toast Item ── */
.gonzurq-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 18px 16px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    pointer-events: all;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    transition: none;
    border-left: 4px solid #64748b;
    min-width: 320px;
}

.gonzurq-toast--enter {
    animation: gonzurqToastIn 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.gonzurq-toast--exit {
    animation: gonzurqToastOut 0.3s ease-in forwards;
}

@keyframes gonzurqToastIn {
    from { 
        opacity: 0; 
        transform: translateX(100%) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
    }
}

@keyframes gonzurqToastOut {
    from { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
    }
    to { 
        opacity: 0; 
        transform: translateX(100%) scale(0.95);
        margin-bottom: -80px;
    }
}

/* ── Toast Types ── */
.gonzurq-toast--success { border-left-color: #22c55e; }
.gonzurq-toast--error   { border-left-color: #ef4444; }
.gonzurq-toast--warning { border-left-color: #f59e0b; }
.gonzurq-toast--info    { border-left-color: #3b82f6; }

/* ── Toast Icon ── */
.gonzurq-toast__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.gonzurq-toast__icon svg {
    width: 22px;
    height: 22px;
}

.gonzurq-toast--success .gonzurq-toast__icon { color: #22c55e; }
.gonzurq-toast--error   .gonzurq-toast__icon { color: #ef4444; }
.gonzurq-toast--warning .gonzurq-toast__icon { color: #f59e0b; }
.gonzurq-toast--info    .gonzurq-toast__icon { color: #3b82f6; }

/* ── Toast Content ── */
.gonzurq-toast__content {
    flex: 1;
    min-width: 0;
}

.gonzurq-toast__title {
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gonzurq-toast__message {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.45;
    word-break: break-word;
}

/* ── Toast Close ── */
.gonzurq-toast__close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.gonzurq-toast__close:hover {
    background: #f1f5f9;
    color: #475569;
}

/* ── Toast Progress Bar ── */
.gonzurq-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.05);
}

.gonzurq-toast__progress-bar {
    height: 100%;
    border-radius: 0 2px 2px 0;
    animation: gonzurqProgress linear forwards;
    animation-duration: 5000ms;
}

.gonzurq-toast--success .gonzurq-toast__progress-bar { background: #22c55e; }
.gonzurq-toast--error   .gonzurq-toast__progress-bar { background: #ef4444; }
.gonzurq-toast--warning .gonzurq-toast__progress-bar { background: #f59e0b; }
.gonzurq-toast--info    .gonzurq-toast__progress-bar { background: #3b82f6; }

@keyframes gonzurqProgress {
    from { width: 100%; }
    to   { width: 0%; }
}


/* ============================================================
   Confirm Modal
   ============================================================ */

.gonzurq-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gonzurq-confirm-overlay.gonzurq-confirm--visible {
    opacity: 1;
}

.gonzurq-confirm-overlay.gonzurq-confirm--exit {
    opacity: 0;
}

.gonzurq-confirm-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px 28px;
    max-width: 420px;
    width: calc(100vw - 40px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.1);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.25s cubic-bezier(0.21, 1.02, 0.73, 1);
}

.gonzurq-confirm--visible .gonzurq-confirm-modal {
    transform: scale(1) translateY(0);
}

.gonzurq-confirm--exit .gonzurq-confirm-modal {
    transform: scale(0.9) translateY(20px);
}

/* ── Confirm Icon ── */
.gonzurq-confirm__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.gonzurq-confirm__icon svg {
    width: 28px;
    height: 28px;
}

.gonzurq-confirm__icon--primary {
    background: #eff6ff;
    color: #3b82f6;
}

.gonzurq-confirm__icon--danger {
    background: #fef2f2;
    color: #ef4444;
}

/* ── Confirm Title ── */
.gonzurq-confirm__title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

/* ── Confirm Message ── */
.gonzurq-confirm__message {
    font-size: 14px;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 24px;
    white-space: pre-line;
}

/* ── Confirm Buttons ── */
.gonzurq-confirm__buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gonzurq-confirm__btn {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    font-family: inherit;
    min-width: 120px;
}

.gonzurq-confirm__btn:focus {
    outline: 3px solid rgba(59, 130, 246, 0.3);
    outline-offset: 2px;
}

.gonzurq-confirm__btn--cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.gonzurq-confirm__btn--cancel:hover {
    background: #e2e8f0;
    color: #334155;
}

.gonzurq-confirm__btn--primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.gonzurq-confirm__btn--primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.gonzurq-confirm__btn--danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.gonzurq-confirm__btn--danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    #gonzurq-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }

    .gonzurq-toast {
        min-width: auto;
    }

    .gonzurq-confirm-modal {
        padding: 24px 20px 20px 20px;
    }

    .gonzurq-confirm__buttons {
        flex-direction: column-reverse;
    }

    .gonzurq-confirm__btn {
        width: 100%;
    }
}

/* ── Dark mode support (futura expansión) ── */
@media (prefers-color-scheme: dark) {
    /* Reservado */
}
