/**
 * JustQuran Theme Styles
 *
 * Base theme styles - combines reader styles with theme layout
 */

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

/* Import reader styles */
@import url('reader-style.css');

/* Theme-specific overrides and additions */
.site-header {
    padding: 1rem;
    text-align: center;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.site-description {
    font-size: 1rem;
    color: #666;
    margin: 0.5rem 0 0;
}

.site-footer {
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 2rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.site-info {
    font-size: 0.875rem;
    color: #666;
    font-family: inherit;
}

/* Landing page styles */
.landing-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.landing-content {
    max-width: 600px;
}

.landing-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.landing-description {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

.button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #3b82f6;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.button:hover {
    background-color: #2563eb;
}

.button-primary {
    background-color: #3b82f6;
}

.button-primary:hover {
    background-color: #2563eb;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .landing-title {
        font-size: 2rem;
    }
    
    .landing-description {
        font-size: 1rem;
    }
    
    .button {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Dark mode support - now handled by body.dark-mode (see below) */

/* Quran Reader Header Bar */
.quran-reader-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.quran-reader-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.quran-reader-header-spacer {
    flex: 1;
}

/* Logo */
.quran-reader-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    letter-spacing: -0.02em;
    line-height: 1;
}

.quran-reader-logo:hover {
    background-color: #f0f9ff;
    color: #2563eb;
    transform: scale(1.05);
}

.quran-reader-logo:active {
    transform: scale(0.98);
}

.quran-reader-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Font Size Controls */
.quran-reader-font-size-controls {
    gap: 0.25rem;
}

.quran-reader-font-size-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quran-reader-font-size-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    user-select: none;
    min-width: 20px;
    text-align: center;
}

.quran-reader-font-size-slider {
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.quran-reader-font-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.quran-reader-font-size-slider::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.quran-reader-font-size-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.quran-reader-font-size-slider::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.quran-reader-font-size-slider::-ms-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Night Mode Toggle */
.quran-reader-night-mode-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.375rem 0.5rem;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quran-reader-night-mode-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* Settings Menu */
.quran-reader-settings-control {
    position: relative;
}

.quran-reader-settings-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.375rem 0.5rem;
    font-size: 1.125rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quran-reader-settings-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.quran-reader-settings-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 0.75rem;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.quran-reader-settings-menu.active {
    display: block;
}

.quran-reader-settings-menu-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quran-reader-settings-menu-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quran-reader-settings-menu-value {
    font-size: 0.875rem;
    color: #1a1a1a;
    font-weight: 500;
}

/* Language Select */
.quran-reader-language-select {
    padding: 0.375rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background-color: #ffffff;
    color: #1a1a1a;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.quran-reader-language-select:hover {
    border-color: #d1d5db;
}

.quran-reader-language-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Dark mode styles for header and footer - applies to entire site */
body.dark-mode .quran-reader-header,
.quran-reader-container.dark-mode .quran-reader-header {
    background-color: #111827;
    border-bottom-color: #374151;
}

body.dark-mode .quran-reader-logo,
.quran-reader-container.dark-mode .quran-reader-logo {
    color: #60a5fa;
}

body.dark-mode .quran-reader-logo:hover,
.quran-reader-container.dark-mode .quran-reader-logo:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
}

body.dark-mode .quran-reader-font-size-label,
.quran-reader-container.dark-mode .quran-reader-font-size-label {
    color: #e0e0e0;
}

body.dark-mode .quran-reader-font-size-slider,
.quran-reader-container.dark-mode .quran-reader-font-size-slider {
    background: #4b5563;
}

body.dark-mode .quran-reader-font-size-slider::-webkit-slider-thumb,
.quran-reader-container.dark-mode .quran-reader-font-size-slider::-webkit-slider-thumb {
    background: #3b82f6;
    border-color: #1f2937;
}

body.dark-mode .quran-reader-font-size-slider::-webkit-slider-thumb:hover,
.quran-reader-container.dark-mode .quran-reader-font-size-slider::-webkit-slider-thumb:hover {
    background: #60a5fa;
}

body.dark-mode .quran-reader-font-size-slider::-moz-range-thumb,
.quran-reader-container.dark-mode .quran-reader-font-size-slider::-moz-range-thumb {
    background: #3b82f6;
    border-color: #1f2937;
}

body.dark-mode .quran-reader-font-size-slider::-moz-range-thumb:hover,
.quran-reader-container.dark-mode .quran-reader-font-size-slider::-moz-range-thumb:hover {
    background: #60a5fa;
}

body.dark-mode .quran-reader-night-mode-btn,
.quran-reader-container.dark-mode .quran-reader-night-mode-btn {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .quran-reader-night-mode-btn:hover,
.quran-reader-container.dark-mode .quran-reader-night-mode-btn:hover {
    background-color: #333;
    border-color: #555;
}

/* Dark mode for settings button */
body.dark-mode .quran-reader-settings-btn,
.quran-reader-container.dark-mode .quran-reader-settings-btn {
    background-color: #2a2a2a;
    border-color: #444;
    color: #f3f4f6;
}

body.dark-mode .quran-reader-settings-btn:hover,
.quran-reader-container.dark-mode .quran-reader-settings-btn:hover {
    background-color: #333;
    border-color: #555;
}

/* Dark mode for settings menu */
body.dark-mode .quran-reader-settings-menu,
.quran-reader-container.dark-mode .quran-reader-settings-menu {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-mode .quran-reader-settings-menu-label,
.quran-reader-container.dark-mode .quran-reader-settings-menu-label {
    color: #9ca3af;
}

body.dark-mode .quran-reader-settings-menu-value,
.quran-reader-container.dark-mode .quran-reader-settings-menu-value {
    color: #f3f4f6;
}

body.dark-mode .quran-reader-language-select,
.quran-reader-container.dark-mode .quran-reader-language-select {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .quran-reader-language-select:hover,
.quran-reader-container.dark-mode .quran-reader-language-select:hover {
    border-color: #555;
}

/* Dark mode for footer */
body.dark-mode .site-footer {
    background-color: #111827;
    border-top-color: #374151;
    color: #f3f4f6;
}

body.dark-mode .site-info {
    color: #9ca3af;
}

body.dark-mode .site-info a {
    color: #60a5fa;
}

body.dark-mode .site-info a:hover {
    color: #93c5fd;
}

/* Dark mode for site header (non-quran pages) */
body.dark-mode .site-header {
    background-color: #111827;
    border-bottom-color: #374151;
    color: #f3f4f6;
}

body.dark-mode .site-title {
    color: #f3f4f6;
}

/* Dark mode for body and page wrapper */
body.dark-mode {
    background-color: #111827;
    color: #f3f4f6;
}

body.dark-mode #page.site {
    background-color: #111827;
}

body.dark-mode .site-main {
    background-color: #111827;
}

body.dark-mode .landing-description {
    color: #9ca3af;
}

/* Font size classes - only apply to verses container */
#verses-container.font-size-small .quran-reader-verse-text {
    font-size: 1rem;
}

#verses-container.font-size-medium .quran-reader-verse-text {
    font-size: 1.125rem;
}

#verses-container.font-size-large .quran-reader-verse-text {
    font-size: 1.375rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .quran-reader-header {
        padding: 0.5rem;
    }
    
    .quran-reader-header-content {
        gap: 0.5rem;
    }
    
    .quran-reader-font-size-wrapper {
        gap: 0.375rem;
    }
    
    .quran-reader-font-size-label {
        font-size: 0.75rem;
        min-width: 18px;
    }
    
    .quran-reader-font-size-slider {
        width: 70px;
    }
    
    .quran-reader-font-size-slider::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
    }
    
    .quran-reader-font-size-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }
    
    .quran-reader-night-mode-btn {
        width: 32px;
        height: 28px;
        font-size: 1rem;
    }
    
    .quran-reader-settings-btn {
        width: 32px;
        height: 28px;
        font-size: 1rem;
    }
    
    .quran-reader-settings-menu {
        min-width: 180px;
        padding: 0.625rem;
    }
    
    .quran-reader-language-select {
        min-width: 80px;
        font-size: 0.8125rem;
        padding: 0.25rem 0.375rem;
    }
}

