@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- THEME ENGINE --- */
:root {
    --theme-bg: #FAF9F6;
    --theme-surface: #FFFFFF;
    --theme-border: #E5E5E5;
    --theme-text: #2D2D2D;
    --theme-muted: #737373;
    --theme-accent: #D97757;
    --theme-accent-hover: #C66646;
}

/* Defaulting to Dark Mode equivalents */
html.dark {
    --theme-bg: #121212;
    --theme-surface: #1E1E1E;
    --theme-border: #333333;
    --theme-text: #EFEFEF;
    --theme-muted: #A1A1AA;
    --theme-accent: #D97757;
    --theme-accent-hover: #E48D73;
}

body {
    font-family: 'Inter', sans-serif;
    /* CHANGE THESE TWO LINES TO USE YOUR VARIABLES */
    background-color: var(--theme-bg);
    color: var(--theme-text);
    
    /* Disable long-press context highlights on mobile elements */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    
    /* Ensure elastic scrolls match the interface background colors */
    overscroll-behavior-y: contain;
}

/* Allow text inputs and fields to still be highlightable */
input, textarea {
    -webkit-user-select: text;
    user-select: text;
}
/* Fluid Ultra-Smooth Kinetic Animations */
.modal-enter {
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.toast-enter {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fade-in {
    animation: fadeIn 0.25s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Premium Dynamic Spinner */
.spinner {
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border-top: 2.5px solid #ffffff;
    width: 18px;
    height: 18px;
    animation: spin 0.65s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sleek Minimalist Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent; 
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Input Accent Adjustments */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    height: auto;
}

/* Smooth fade-in for lazy-loaded images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
img[loading="lazy"].loaded,
img.loaded {
    opacity: 1 !important;
}

/* Dynamic Profile Sync State Hiding */
#profile-linked-status:not(.hidden) + #profile-unlinked-state { 
    display: none; 
}