@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #818cf8;
    }

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Toast Animation */
.toast-item {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

    .toast-item.show {
        transform: translateX(0);
    }

/* Modal Animation */
.modal-enter {
    animation: fadeIn 0.2s ease;
}

.modal-leave {
    animation: fadeOut 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Prose Styles */
.prose {
    max-width: 65ch;
    color: #374151;
}

    .prose p {
        margin-bottom: 1.25em;
        line-height: 1.75;
    }

    .prose h2 {
        font-size: 1.5em;
        margin-top: 2em;
        margin-bottom: 1em;
        font-weight: 600;
    }

    .prose h3 {
        font-size: 1.25em;
        margin-top: 1.5em;
        margin-bottom: 0.75em;
        font-weight: 600;
    }

    .prose ul, .prose ol {
        margin-top: 1.25em;
        margin-bottom: 1.25em;
        padding-right: 1.5em;
    }

    .prose li {
        margin-top: 0.5em;
        margin-bottom: 0.5em;
    }

.dark .prose {
    color: #d1d5db;
}

/* Print Styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    body {
        background: white;
        padding: 0;
        margin: 0;
    }
}

/* RTL Fix for Swiper */
.swiper {
    direction: ltr;
}

.swiper-slide {
    direction: rtl;
}

/* Form Validation Styles */
.input-validation-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.field-validation-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* Tooltip */
.tooltip {
    position: relative;
}

    .tooltip:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background-color: #1f2937;
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        z-index: 10;
    }
