/*
 * style.css
 * This file contains the custom styles for the Website & Article Analyzer application.
 * It includes styles for typography, dark mode, animations, and general layout.
 */

/* =========================================
   Base Styles and Typography
   ========================================= */

/* Use the Tajawal font for the entire body */
body {
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Base colors for light mode */
body.light {
    background-color: #f3f4f6; /* bg-gray-100 */
    color: #1f2937; /* text-gray-900 */
}

/* =========================================
   Dark Mode Styles
   ========================================= */

/* Dark mode colors */
body.dark {
    background-color: #111827; /* bg-gray-900 */
    color: #e5e7eb; /* text-gray-100 */
}

/* Override Tailwind dark mode styles for a smoother transition */
.dark .bg-white {
    background-color: #1f2937; /* bg-gray-800 */
}

.dark .text-gray-900 {
    color: #f9fafb; /* text-gray-50 */
}

.dark .bg-gray-100 {
    background-color: #1f2937;
}

.dark .text-gray-700 {
    color: #d1d5db; /* text-gray-300 */
}

.dark .text-gray-600 {
    color: #9ca3af; /* text-gray-400 */
}

.dark .border-gray-300 {
    border-color: #4b5563; /* border-gray-600 */
}

.dark input,
.dark textarea,
.dark select {
    background-color: #374151; /* bg-gray-700 */
    color: #e5e7eb;
}

.dark .bg-gray-200 {
    background-color: #4b5563;
}

/* =========================================
   Component Styles
   ========================================= */

/* Style for the main container */
.container {
    max-width: 960px;
}

/* Auth Modal Specific Styles */
#auth-modal {
    animation: fadeIn 0.3s ease-out;
}

#auth-modal > div {
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Style for the results dashboard sections */
.result-section {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.result-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-section .toggle-section {
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.result-section .toggle-section:hover {
    background-color: #f9fafb;
}

.dark .result-section .toggle-section:hover {
    background-color: #374151;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.fa-chevron-up {
    transform: rotate(180deg);
}

/* Style for progress bars */
#domain-authority-progress,
#performance-progress,
#seo-overall-progress {
    transition: width 1s ease-in-out;
}

/* Style for AI-related sections to make them stand out */
.ai-section {
    border: 1px dashed #6b46c1; /* purple-600 */
    background-color: #f3e8ff; /* purple-100 */
}

.dark .ai-section {
    border-color: #9f7aea; /* purple-400 */
    background-color: #4c1d95; /* purple-900 */
}

/* =========================================
   Utility and Animation Classes
   ========================================= */

/* Custom animation for spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* RTL (Right-to-Left) adjustments for Arabic layout */
.rtl:md:space-x-reverse > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

/* Ensure icons have correct margin in RTL */
.fa-chart-line, .fa-edit, .fa-sync-alt, .fa-file-pdf, .fa-sign-in-alt, .fa-sign-out-alt {
    margin-left: 0.5rem;
    margin-right: 0;
}

.rtl .fa-chart-line, .rtl .fa-edit, .rtl .fa-sync-alt, .rtl .fa-file-pdf, .rtl .fa-sign-in-alt, .rtl .fa-sign-out-alt {
    margin-right: 0.5rem;
    margin-left: 0;
}
