/* 
   Fix CSS - Addressing specific layout and styling issues for the new design
*/

/* Force light theme as default, dark theme only when .dark class is applied */
:root {
    color-scheme: light !important;
}

html.dark {
    color-scheme: dark !important;
}

/* Remove text decorations globally */
* {
    text-decoration: none !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Fix for Bootstrap collapse on mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--primary-blue);
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 1rem;
    }
}

/* Ensure proper spacing for sections */
section {
    position: relative;
}

/* Fix for form controls in dark mode */
html.dark .form-control {
    background-color: #2C3E50;
    border-color: #4A5568;
    color: var(--text-dark);
}

html.dark .form-control:focus {
    background-color: #34495E;
    border-color: var(--secondary-blue);
    color: var(--text-dark);
}

/* Fix for upload zones in dark mode */
html.dark .upload-zone {
    background-color: #2C3E50;
    border-color: #4A5568;
}

html.dark .upload-zone:hover {
    border-color: var(--secondary-blue);
    background-color: rgba(27, 138, 201, 0.1);
}

html.dark .upload-text {
    color: var(--text-dark);
}

/* Fix for cards in dark mode */
html.dark .card {
    background-color: #34495E;
    border-color: #4A5568;
}

/* Ensure buttons are properly styled */
.btn {
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Fix for star rating in dark mode */
html.dark .star-rating label {
    color: #555;
}

html.dark .star-rating label:hover,
html.dark .star-rating label:hover ~ label,
html.dark .star-rating input:checked ~ label {
    color: #ffc107;
}

/* Alert styling */
.alert {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

html.dark .alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #4ade80;
}

html.dark .alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    color: #f87171;
}

/* Spinner styling */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25em;
}

/* Fix for mobile responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .hero-section,
    .how-it-works-section,
    .upload-section,
    .use-cases-section,
    .contact-section {
        padding: 3rem 0 !important;
    }
    
    .workflow-visual {
        flex-direction: column !important;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}
