/* UI Manager Styles */

/* Toast Styles */
#toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    pointer-events: none;
}

@media (max-width: 768px) {
    #toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    .toast {
        min-width: auto;
        width: 100%;
    }
}

.toast {
    min-width: 280px;
    padding: 1rem 1.2rem;
    background: rgba(23, 25, 35, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: toast-in 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    pointer-events: auto;
}

.toast.error { border-left: 4px solid #ef4444; }
.toast.error i { color: #ef4444; }
.toast.success { border-left: 4px solid #10b981; }
.toast.success i { color: #10b981; }
.toast.info { border-left: 4px solid var(--primary); }
.toast.info i { color: var(--primary); }

.toast-content {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes toast-in {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* Confirm Modal Styles */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s ease;
}

.confirm-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease;
    animation: zoom-in 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@media (max-width: 480px) {
    .confirm-card {
        padding: 1.5rem;
    }
    .confirm-title {
        font-size: 1.1rem;
    }
}

.confirm-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.confirm-title i {
    color: var(--primary);
    font-size: 1.6rem;
}

.confirm-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.confirm-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.confirm-ok {
    background: linear-gradient(135deg, var(--primary), #0099ff);
    color: #000;
}

.confirm-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-dim);
}

@keyframes zoom-in {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Global Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
    }
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Global Loading Spinner */
#global-spinner {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 20000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

#global-spinner.active {
    display: flex;
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

#global-spinner-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
