/* =====================================================
   MAZE SYSTEMS - Notification & Toast System
   ===================================================== */

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

/* Individual Toast */
.toast {
    background: linear-gradient(135deg, rgba(20, 17, 13, 0.98), rgba(12, 10, 8, 0.98));
    border: 1px solid rgba(255, 138, 61, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

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

/* Toast Icon */
.toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    font-family: 'Rajdhani', sans-serif;
}

.toast-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    word-wrap: break-word;
}

/* Toast Close Button */
.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #fff;
    transform: scale(1.1);
}

/* Toast Types */
.toast.success {
    border-color: rgba(76, 175, 80, 0.4);
}

.toast.success .toast-icon {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.toast.success .toast-title {
    color: #4caf50;
}

.toast.error {
    border-color: rgba(244, 67, 54, 0.4);
}

.toast.error .toast-icon {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.toast.error .toast-title {
    color: #f44336;
}

.toast.warning {
    border-color: rgba(255, 152, 0, 0.4);
}

.toast.warning .toast-icon {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
}

.toast.warning .toast-title {
    color: #ff9800;
}

.toast.info {
    border-color: rgba(33, 150, 243, 0.4);
}

.toast.info .toast-icon {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
}

.toast.info .toast-title {
    color: #2196f3;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    width: 100%;
    transform-origin: left;
}

.toast.success .toast-progress { background: linear-gradient(90deg, #4caf50, #81c784); }
.toast.error .toast-progress { background: linear-gradient(90deg, #f44336, #e57373); }
.toast.warning .toast-progress { background: linear-gradient(90deg, #ff9800, #ffb74d); }
.toast.info .toast-progress { background: linear-gradient(90deg, #2196f3, #64b5f6); }

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

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: linear-gradient(135deg, #1a1a1b, #14110d);
    border: 1px solid rgba(255, 138, 61, 0.2);
    border-radius: 16px;
    padding: 0;
    max-width: 440px;
    width: 100%;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

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

.confirm-header {
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.confirm-modal.warning .confirm-icon {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
}

.confirm-modal.danger .confirm-icon {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.confirm-modal.info .confirm-icon {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
}

.confirm-modal.success .confirm-icon {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.confirm-header-content {
    flex: 1;
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    font-family: 'Rajdhani', sans-serif;
}

.confirm-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.confirm-body {
    padding: 20px 24px;
}

.confirm-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

.confirm-message ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
}

.confirm-message li {
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
}

.confirm-message strong {
    color: #fff;
}

.confirm-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.confirm-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.confirm-btn-confirm {
    background: linear-gradient(135deg, #FF8A3D, #E7A95F);
    color: #fff;
}

.confirm-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 138, 61, 0.4);
}

.confirm-btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: #fff;
}

.confirm-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.4);
}

/* =====================================================
   Alert Modal (for info display)
   ===================================================== */

.alert-tickets-list {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 12px;
}

.alert-ticket-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.alert-ticket-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.alert-ticket-item:first-child {
    padding-top: 0;
}

.alert-ticket-id {
    font-family: monospace;
    font-size: 12px;
    color: #FF8A3D;
    background: rgba(255, 138, 61, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.alert-ticket-subject {
    flex: 1;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-ticket-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.alert-ticket-status.open { background: rgba(76,175,80,0.15); color: #4caf50; }
.alert-ticket-status.in_progress { background: rgba(33,150,243,0.15); color: #2196f3; }
.alert-ticket-status.waiting { background: rgba(255,152,0,0.15); color: #ff9800; }

/* =====================================================
   Mobile Responsive
   ===================================================== */

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }
    
    .toast {
        padding: 14px 16px;
    }
    
    .toast-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .confirm-modal {
        max-width: 100%;
        margin: 0;
    }
    
    .confirm-footer {
        flex-direction: column;
    }
    
    .confirm-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   Animations
   ===================================================== */

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.toast-progress.animate {
    animation: toast-progress linear forwards;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.confirm-modal.shake {
    animation: shake 0.5s ease-in-out;
}
