/* ===== Thamara Books - Custom Styles ===== */

/* RTL Base */
html {
    direction: rtl;
}

body {
    font-family: 'Tajawal', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* WordPress Navigation Menu Styling */
.menu li {
    list-style: none;
}

.menu li a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.menu li a:hover {
    background-color: rgb(248 250 252);
}

/* Sub-menu */
.menu li .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    padding: 0.5rem;
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    z-index: 50;
}

.menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu li .sub-menu li a {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.menu > li {
    position: relative;
}

/* WordPress Pagination */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgb(226 232 240);
    background: white;
    color: rgb(71 85 105);
}

.nav-links .page-numbers:hover {
    border-color: rgb(1 90 159);
    color: rgb(1 90 159);
    background: rgb(240 247 255);
}

.nav-links .page-numbers.current {
    background: rgb(1 90 159);
    color: white;
    border-color: rgb(1 90 159);
}

.nav-links .prev,
.nav-links .next {
    gap: 0.5rem;
}

.nav-links .dots {
    border: none;
    background: none;
    color: rgb(148 163 184);
}

/* Prose / Content Styling */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: rgb(15 23 42);
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: rgb(30 41 59);
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-right: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.25rem;
    line-height: 1.8;
}

.prose blockquote {
    border-right: 4px solid rgb(1 90 159);
    padding-right: 1rem;
    padding-left: 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: rgb(71 85 105);
}

.prose a {
    color: rgb(1 90 159);
    text-decoration: underline;
}

.prose a:hover {
    color: rgb(6 76 131);
}

.prose img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

/* Search Modal Transitions */
#search-modal {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scroll animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.fade-in-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover lift */
article.group:hover {
    transform: translateY(-2px);
}

/* Selection Color */
::selection {
    background-color: rgb(1 90 159);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgb(241 245 249);
}

::-webkit-scrollbar-thumb {
    background: rgb(148 163 184);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(100 116 139);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid rgb(1 90 159);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Author Dashboard Styles */
.flavor-dashboard .form-field {
    margin-bottom: 1.5rem;
}

.flavor-dashboard .form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgb(30 41 59);
}

.flavor-dashboard .form-field input,
.flavor-dashboard .form-field textarea,
.flavor-dashboard .form-field select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    background: white;
}

.flavor-dashboard .form-field input:focus,
.flavor-dashboard .form-field textarea:focus,
.flavor-dashboard .form-field select:focus {
    outline: none;
    border-color: rgb(1 90 159);
    box-shadow: 0 0 0 3px rgb(1 90 159 / 0.1);
}

/* Status badges */
.status-publish {
    background-color: rgb(220 252 231);
    color: rgb(22 101 52);
}

.status-pending {
    background-color: rgb(254 249 195);
    color: rgb(133 77 14);
}

.status-draft {
    background-color: rgb(241 245 249);
    color: rgb(71 85 105);
}

.status-rejected {
    background-color: rgb(254 226 226);
    color: rgb(153 27 27);
}

/* Print styles */
@media print {
    header,
    footer,
    #back-to-top,
    #search-modal,
    .no-print {
        display: none !important;
    }
}
