/* 
    Vylithra Custom UI Components 
    Premium Notifications & Modals
*/

:root {
    --toast-bg: var(--card-bg, #ffffff);
    --toast-text: var(--text-main, #1f2937);
    --toast-border: var(--border, #e5e7eb);
    --modal-backdrop: rgba(0, 0, 0, 0.6);
}

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

.vylithra-toast {
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--toast-border);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    cursor: default;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.vylithra-toast i {
    font-size: 1.2rem;
}

.vylithra-toast.success i {
    color: #10b981;
}

.vylithra-toast.error i {
    color: #ef4444;
}

.vylithra-toast.info i {
    color: var(--primary, #4f46e5);
}

/* Modal System */
.vylithra-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-backdrop);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vylithra-modal-backdrop.show {
    opacity: 1;
}

.vylithra-modal {
    background: var(--toast-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vylithra-modal-backdrop.show .vylithra-modal {
    transform: translateY(0);
}

.vylithra-modal-header {
    padding: 24px 24px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vylithra-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.vylithra-modal-body {
    padding: 0 24px 24px;
    color: var(--text-muted, #6b7280);
    line-height: 1.5;
}

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

.vylithra-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.vylithra-btn-outline {
    background: transparent;
    border: 1px solid var(--toast-border);
    color: var(--toast-text);
}

.vylithra-btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.vylithra-btn-primary {
    background: var(--primary, #4f46e5);
    color: var(--btn-text, #ffffff);
}

.vylithra-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Global Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    /* Muted gray with opacity */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

/* Force dark color scheme for native elements if body is dark */
@media (prefers-color-scheme: dark) {
    html {
        color-scheme: dark;
    }
}