@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    overscroll-behavior-y: none;
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.sortable-ghost { opacity: 0.4; background-color: var(--ghost-bg, #f1f5f9); border: 2px dashed #cbd5e1; }
.dark .sortable-ghost { --ghost-bg: #1e293b; border-color: #475569; }
.sortable-drag { cursor: grabbing !important; }
.grab-cursor { cursor: grab; }

.user-list-container > div { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Modal and Bottom Sheet Animations */
.modal-enter { opacity: 1 !important; pointer-events: auto !important; }
.modal-enter > div:not(.bottom-sheet-content) { transform: scale(1) !important; }
.modal-enter > .bottom-sheet-content { transform: translateY(0) !important; }

/* iOS Toggle Switch */
.ios-toggle-checkbox:checked { right: 0; border-color: #10B981; }
.ios-toggle-checkbox:checked + .ios-toggle-label { background-color: #10B981; }

@keyframes slideInDown { 0% { transform: translate(-50%, -100%); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 1; } }
@keyframes fadeOutUp { 0% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, -100%); opacity: 0; } }
.toast-show { animation: slideInDown 0.3s forwards; }
.toast-hide { animation: fadeOutUp 0.3s forwards; }

/* Tree Lines */
.tree-line { position: relative; }
.tree-line::before { content: ''; position: absolute; right: -16px; top: 0; bottom: 0; width: 2px; background-color: #e2e8f0; }
.dark .tree-line::before { background-color: #334155; }

/* Safe Area (for PWA) */
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* Custom Checkbox Styling */
.custom-checkbox-input {
    display: none;
}
.custom-checkbox-label {
    position: relative;
    padding-right: 32px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}
.custom-checkbox-label::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background-color: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark .custom-checkbox-label::before {
    border-color: #475569;
}
.custom-checkbox-input:checked + .custom-checkbox-label::before {
    background-color: #3b82f6;
    border-color: #3b82f6;
}
.custom-checkbox-label::after {
    content: '';
    position: absolute;
    right: 7px;
    top: 50%;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-60%) rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}
.custom-checkbox-input:checked + .custom-checkbox-label::after {
    opacity: 1;
    transform: translateY(-60%) rotate(45deg) scale(1);
}
