/* 
 * AnalyzeLegal Theme - Modern Legal Professional Design
 * Created: 2025-06-06
 * Version: 1.0
 */

:root {
    /* Primary color palette - Arizona-inspired colors for legal analysis */
    --primary: #3498DB; /* Arizona maroon */
    --primary-light: #3498DB;
    --primary-dark: #2C3E50;
    --secondary: #003057; /* Deep blue for legal context */
    --accent: #FFBF3C; /* Arizona gold */
    
    /* Neutral colors */
    --neutral-50: #f7fafc;
    --neutral-100: #edf2f7;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e0;
    --neutral-400: #a0aec0;
    --neutral-500: #718096;
    --neutral-600: #4a5568;
    --neutral-700: #2d3748;
    --neutral-800: #1a202c;
    --neutral-900: #171923;
    
    /* Semantic colors */
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --info: #3182ce;
    
    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 0.125rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base styles */
body {
    font-family: var(--font-body);
    color: var(--neutral-800);
    background-color: var(--neutral-50);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--neutral-900);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.25);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Announcement bar */
.announcement-bar {
    background-color: var(--primary-dark);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.announcement-bar a {
    color: white;
    text-decoration: underline;
}

/* Header */
.header {
    position: relative;
    z-index: 1000;
}

.navbar.navbar-dark {
    padding: 0.75rem 0;
    background-color: var(--primary-dark) !important; /* Dark background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-bottom: none;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff !important; /* White text */
    padding: 0.5rem 0;
}

.navbar-brand .logo-text {
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.navbar-brand .validator-red {
    color: #e63946 !important; /* Brighter red for better visibility */
    font-weight: 800;
    text-shadow: 0 0 1px rgba(0,0,0,0.2); /* Subtle shadow for better contrast */
}

.navbar.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important; /* White with slight transparency */
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    position: relative;
}

.navbar.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 8px;
    left: 1.25rem;
    background-color: #ffffff; /* White underline */
    transition: width 0.3s ease;
}

.navbar.navbar-dark .navbar-nav .nav-link:hover,
.navbar.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff !important;
}

.navbar.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar.navbar-dark .navbar-nav .nav-link.active::after {
    width: calc(100% - 2.5rem);
}

/* Improve contrast for dropdown menu */
.navbar.navbar-dark .dropdown-menu {
    border: none;
    background-color: var(--primary-dark); /* Dark background for dropdown */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.navbar.navbar-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1.5rem;
    font-weight: 400;
}

.navbar.navbar-dark .dropdown-item:hover,
.navbar.navbar-dark .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Mobile menu button contrast */
.navbar.navbar-dark .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--neutral-700) !important;
    position: relative;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link {
    color: var(--neutral-700) !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--neutral-700) !important;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary);
}

.login-btn, .register-btn {
    padding: 0.375rem 1rem;
    margin-top: -0.125rem;
}

/* Main content */
.main-content {
    min-height: calc(100vh - 350px);
    padding: 2rem 0;
}

.page-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--neutral-200);
    padding-bottom: 1rem;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--neutral-600);
    font-size: 1.125rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card:hover {
    /* transform: translateY(-5px); */
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--neutral-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table {
    color: var(--neutral-800);
}

.table th {
    font-weight: 600;
    background-color: var(--neutral-100);
    border-bottom: none;
}

.table td {
    vertical-align: middle;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: var(--radius-md);
}

/* Forms */
.form-control {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    border: 1px solid var(--neutral-300);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--neutral-700);
}

/* Footer */
.footer {
    background-color: #000 !important;
    color: var(--neutral-300);
    padding: 4rem 0 2rem;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-heading-sm {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-description {
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-links {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--neutral-400);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: background-color 0.2s ease;
}

.social-icon:hover {
    background-color: var(--primary);
    color: white;
}

.footer-divider {
    margin: 2rem 0;
    border-color: var(--neutral-700);
    opacity: 0.2;
}

.footer-bottom {
    font-size: 0.875rem;
}

.copyright {
    color: var(--neutral-500);
    margin-bottom: 0;
}

.language-selector .btn {
    color: var(--neutral-400);
    background-color: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.language-selector .btn:hover {
    color: white;
}

/* History Page Enhancements */
.history-card {
    transition: box-shadow 0.2s ease;
    border: 1px solid var(--neutral-200);
}

.history-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-card .card-title {
    color: var(--neutral-800);
    font-weight: 600;
}

.history-card .badge {
    font-size: 0.75rem;
    font-weight: 500;
}

.history-card h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-600);
}

.history-card .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.history-card .list-unstyled li {
    padding: 0.25rem 0;
}

/* History Detail Page Enhancements */
.detail-header {
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-header h2 {
    color: var(--neutral-800);
    font-weight: 700;
    margin-bottom: 1rem;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-meta-item i {
    color: var(--primary);
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.detail-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--neutral-200);
    height: fit-content;
}

.detail-section h3 {
    color: var(--neutral-800);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--neutral-200);
}

.detail-section h5 {
    color: var(--neutral-700);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.document-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #495057;
}

.document-content p {
    margin-bottom: 1rem;
    text-align: justify;
    text-justify: inter-word;
}

.document-content p:last-child {
    margin-bottom: 0;
}

.document-content::-webkit-scrollbar {
    width: 8px;
}

.document-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.document-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.document-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.issue-card {
    border-left: 4px solid var(--warning);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease;
}

.issue-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recommendation-card {
    border-left: 4px solid var(--success);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease;
}

.recommendation-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Highlight functionality for document content */
.highlight-pulse {
    background-color: #ffeb3b !important;
    color: #333 !important;
    padding: 2px 4px;
    border-radius: 3px;
    animation: pulse-highlight 2s ease-in-out;
    box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.3);
}

@keyframes pulse-highlight {
    0% {
        background-color: #ffeb3b;
        box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.6);
    }
    50% {
        background-color: #fff176;
        box-shadow: 0 0 0 4px rgba(255, 235, 59, 0.4);
    }
    100% {
        background-color: #ffeb3b;
        box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.3);
    }
}

/* Ensure highlight buttons are visible and styled */
.highlight-text {
    background: #007bff;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s ease;
}

.highlight-text:hover {
    background: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-link.active:after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-heading {
        margin-bottom: 1rem;
    }
    
    .footer-heading-sm {
        margin-bottom: 1rem;
        margin-top: 1.5rem;
    }
}

/* Utility classes */
.text-primary {
    color: var(--primary) !important;
}

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

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

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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