:root {
    --primary: #137fec;
}

body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RTL Support */
[dir="rtl"] body {
    font-family: 'Inter', sans-serif;
}

/* Layout Stability */
#gregorian-date,
#hijri-date {
    min-height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smooth fade for content changes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

/* Tab Navigation Styles */
.tab-button {
    color: rgb(100 116 139);
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-button:hover:not(.active) {
    color: rgb(71 85 105);
}

.dark .tab-button {
    color: rgb(148 163 184);
}

.dark .tab-button.active {
    color: var(--primary);
}

.dark .tab-button:hover:not(.active) {
    color: rgb(203 213 225);
}

/* Tab Content */
.tab-content {
    animation: fadeIn 0.4s ease-out;
}

.tab-content.hidden {
    display: none;
}

/* Fail-safe utilities for primary color */
.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.hover\:bg-primary\/90:hover {
    background-color: rgba(19, 127, 236, 0.9) !important;
}

/* Optimized Animations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}