/* DreamCurtains Global UI — toast & confirm modal */

/* Confirm modal */
.dc-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.dc-confirm-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dc-confirm-modal {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s ease;
}

.dc-confirm-overlay.is-open .dc-confirm-modal {
    transform: translateY(0) scale(1);
}

.dc-confirm-modal h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dc-confirm-modal p {
    margin: 0;
    color: #667085;
    line-height: 1.6;
    font-size: 0.9375rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dc-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.dc-btn-cancel,
.dc-btn-confirm {
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dc-btn-cancel {
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #374151;
}

.dc-btn-cancel:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.dc-btn-confirm {
    border: none;
    background: #0E3A66;
    color: #fff;
}

.dc-btn-confirm:hover {
    background: #184F87;
}

.dc-btn-confirm.is-danger {
    background: #DC2626;
}

.dc-btn-confirm.is-danger:hover {
    background: #B91C1C;
}

/* Toast */
.dc-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.dc-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #E5E7EB;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dc-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.dc-toast.is-leaving {
    opacity: 0;
    transform: translateX(24px);
}

.dc-toast__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
}

.dc-toast--success .dc-toast__icon {
    background: #ECFDF3;
    color: #0D7A4E;
}

.dc-toast--error .dc-toast__icon {
    background: #FEF2F2;
    color: #C62828;
}

.dc-toast--warning .dc-toast__icon {
    background: #FFFBEB;
    color: #B45309;
}

.dc-toast__body {
    flex: 1;
    min-width: 0;
}

.dc-toast__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.dc-toast--success .dc-toast__label { color: #0D7A4E; }
.dc-toast--error .dc-toast__label { color: #C62828; }
.dc-toast--warning .dc-toast__label { color: #B45309; }

.dc-toast__message {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1B1F24;
    word-break: break-word;
}

.dc-toast__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #9CA3AF;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
}

.dc-toast__close:hover {
    background: #F3F4F6;
    color: #374151;
}

@media (max-width: 576px) {
    .dc-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .dc-confirm-modal {
        padding: 22px;
        border-radius: 16px;
    }

    .dc-confirm-actions {
        flex-direction: column-reverse;
    }

    .dc-btn-cancel,
    .dc-btn-confirm {
        width: 100%;
    }
}
