/* ============================================================
   Toast Notifications & Custom Confirm Dialog
   Passend zum Counseling-App Orange-Theme
   ============================================================ */

/* --- Toast Container --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

/* --- Toast Item --- */
.toast-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Muli', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    cursor: pointer;
    min-width: 280px;
}

.toast-item.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-item.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Icon */
.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Toast Body */
.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #555;
}

/* Toast Close */
.toast-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    margin-top: -2px;
}

.toast-close:hover {
    color: #333;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    border-radius: 0 0 8px 0;
    animation: toast-progress-shrink linear forwards;
}

@keyframes toast-progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* --- Toast Variants --- */
.toast-item.toast-success {
    border-left-color: #32CD32;
}
.toast-item.toast-success .toast-icon {
    color: #32CD32;
}
.toast-item.toast-success .toast-progress {
    background-color: #32CD32;
}

.toast-item.toast-error {
    border-left-color: #D00019;
}
.toast-item.toast-error .toast-icon {
    color: #D00019;
}
.toast-item.toast-error .toast-progress {
    background-color: #D00019;
}

.toast-item.toast-warning {
    border-left-color: #F3BB45;
}
.toast-item.toast-warning .toast-icon {
    color: #F3BB45;
}
.toast-item.toast-warning .toast-progress {
    background-color: #F3BB45;
}

.toast-item.toast-info {
    border-left-color: #68B3C8;
}
.toast-item.toast-info .toast-icon {
    color: #68B3C8;
}
.toast-item.toast-info .toast-progress {
    background-color: #68B3C8;
}


/* ============================================================
   Custom Confirm Dialog (Ersatz fuer JS confirm())
   ============================================================ */

/* Overlay - Positionierung erfolgt via JS inline styles,
   damit kein CSS-Containment (transform, perspective etc.) sie brechen kann */
.confirm-overlay {
    z-index: 10000;
    background: rgba(0, 0, 0, 0.45);
    display: none;  /* wird via JS auf flex gesetzt */
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.confirm-overlay.show {
    opacity: 1;
}

/* Dialog Box - Zentrierung via position absolute + transform,
   damit es unabhaengig vom Flex-Verhalten des Overlays funktioniert */
.confirm-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 90%;
    padding: 30px;
    text-align: center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Muli', 'Helvetica Neue', Arial, sans-serif;
}

.confirm-overlay.show .confirm-dialog {
    transform: translate(-50%, -50%) scale(1);
}

/* Dialog Icon */
.confirm-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #F3BB45;
}

.confirm-icon.danger {
    color: #D00019;
}

/* Dialog Title */
.confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

/* Dialog Message */
.confirm-message {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Dialog Buttons */
.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn {
    padding: 10px 28px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Muli', 'Helvetica Neue', Arial, sans-serif;
}

.confirm-btn:focus {
    outline: 2px solid #F3BB45;
    outline-offset: 2px;
}

.confirm-btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.confirm-btn-cancel:hover {
    background: #e0e0e0;
    color: #333;
}

.confirm-btn-ok {
    background: #F3BB45;
    color: #fff;
}

.confirm-btn-ok:hover {
    background: #e5a830;
}

.confirm-btn-danger {
    background: #D00019;
    color: #fff;
}

.confirm-btn-danger:hover {
    background: #b00015;
}
