/* Notification System Styles */

/* --- Toast Container --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* --- Toast Item --- */
.toast-item {
    min-width: 320px;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: auto;
    border-left: 5px solid #ccc;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    opacity: 0;
}

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

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

/* Responsive Toast */
@media (max-width: 480px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        align-items: center;
    }
    
    .toast-item {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
    }
}

/* Toast Elements */
.toast-icon {
    margin-right: 16px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 16px;
    color: #1a1a1a;
}

.toast-message {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
    display: flex;
    align-items: flex-start;
    height: 100%;
}

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

/* Toast Variants */
.toast-success { border-left-color: #10b981; }
.toast-success .toast-icon { color: #10b981; }

.toast-error { border-left-color: #ef4444; }
.toast-error .toast-icon { color: #ef4444; }

.toast-warning { border-left-color: #f59e0b; }
.toast-warning .toast-icon { color: #f59e0b; }

.toast-info { border-left-color: #3b82f6; }
.toast-info .toast-icon { color: #3b82f6; }

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0,0,0,0.05);
}

.toast-progress-bar {
    height: 100%;
    background: currentColor;
    width: 100%;
    transition: width linear;
}

.toast-success .toast-progress-bar { background-color: #10b981; }
.toast-error .toast-progress-bar { background-color: #ef4444; }
.toast-warning .toast-progress-bar { background-color: #f59e0b; }
.toast-info .toast-progress-bar { background-color: #3b82f6; }


/* --- Modal Styles --- */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.custom-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.custom-modal-overlay.show .custom-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.custom-modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.custom-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.3;
}

.custom-modal-title i {
    font-size: 24px;
}

.custom-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    border-radius: 8px;
    line-height: 1;
    transition: all 0.2s;
    margin-top: -4px;
    margin-right: -4px;
}

.custom-modal-close:hover {
    color: #4b5563;
    background: #f3f4f6;
}

/* Modal Body */
.custom-modal-body {
    padding: 16px 24px 24px 24px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.6;
    overflow-y: auto;
}

/* Modal Footer */
.custom-modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: transparent;
    /* Optional: border-top: 1px solid #f3f4f6; */
}

/* Modal Buttons */
.btn-modal {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 80px;
}

.btn-modal:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4);
}

.btn-modal:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Secondary Button (Cancel) */
.btn-modal-secondary {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.btn-modal-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}

.btn-modal-secondary:active {
    background: #f3f4f6;
}

/* Primary Button (Confirm) */
.btn-modal-primary {
    background: #667eea; /* Simpa Guru Theme */
    color: white;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}

.btn-modal-primary:hover {
    background: #5a6fd1;
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(102, 126, 234, 0.3);
}

.btn-modal-primary:active {
    transform: translateY(0);
    background: #4c5eb5;
}

/* Danger Button */
.btn-modal-danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.25);
}

.btn-modal-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(239, 68, 68, 0.3);
}

.btn-modal-danger:active {
    transform: translateY(0);
    background: #b91c1c;
}

/* Spinner for Loading State */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    margin: 0 auto;
    color: #667eea;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}
