/* QuickTail Custom Styles */

/* Global styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure navbar brand alignment across all pages */
.navbar-brand {
    display: flex !important;
    align-items: center !important;
}

main {
    flex: 1;
}

/* Card styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Only apply hover effects on non-touch devices */
@media (hover: hover) {
    .card {
        transition: all 0.3s ease;
    }
    
    .card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
}

.card-header {
    font-weight: 600;
}

/* Quick Report section - Consistent flex layout like Custom Topics */
.quick-report-cards {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    touch-action: pan-x; /* Allow horizontal panning only */
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
}

.quick-report-cards::-webkit-scrollbar {
    height: 8px;
}

.quick-report-cards::-webkit-scrollbar-track {
    background: var(--bs-dark);
    border-radius: 4px;
}

.quick-report-cards::-webkit-scrollbar-thumb {
    background-color: var(--bs-gray-600);
    border-radius: 4px;
}

.quick-report-card {
    border: 1px solid var(--bs-dark);
    min-height: 150px;
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    touch-action: pan-x; /* Allow horizontal panning only */
}

.quick-report-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Custom Topic section */
.topic-content-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: thin;
}

.topic-content-container::-webkit-scrollbar {
    height: 8px;
}

.topic-content-container::-webkit-scrollbar-track {
    background: var(--bs-dark);
    border-radius: 4px;
}

.topic-content-container::-webkit-scrollbar-thumb {
    background-color: var(--bs-gray-600);
    border-radius: 4px;
}

.content-card {
    min-width: 280px;
    max-width: 320px;
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-card img {
    border-radius: 0.5rem;
}

/* Buttons and icons */
.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none !important;
}

/* Remove borders from outline buttons */
.btn-outline-secondary {
    border: none !important;
}

/* Remove border from delete button */
.btn-outline-danger {
    border: none !important;
}

/* Clean styling for Save button */
.btn-success {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* Clean styling for primary buttons (Save button) */
.btn-primary {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
    font-weight: 600;
    font-size: inherit;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* Landing page specific button styling */
.landing-page .btn-primary {
    background-color: var(--bs-primary) !important;
    border: 2px solid var(--bs-primary) !important;
    border-radius: 25px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    color: white !important;
    transition: all 0.3s ease;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.landing-page .btn-primary:hover {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    opacity: 0.8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.landing-page .btn-outline-secondary {
    background-color: transparent !important;
    border: 2px solid #6c757d !important;
    border-radius: 25px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    color: #6c757d !important;
    transition: all 0.3s ease;
}

.landing-page .btn-outline-secondary:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Landing page enhancements */
.landing-page .display-3 {
    font-weight: 700;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-page .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.landing-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.landing-page .rounded-circle {
    transition: all 0.3s ease;
}

.landing-page .rounded-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
}

/* Landing page logo enhancement - 3x larger */
body.home-page .navbar-brand img {
    height: 90px !important;
}

body.home-page .navbar-brand {
    font-size: 2.5rem !important;
}

/* Animation for loading skeleton */
@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.skeleton-loading {
    animation: pulse 1.5s infinite;
    background-color: var(--bs-gray-700);
    border-radius: 0.25rem;
}

/* Weather icons */
.weather-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Navigation improvements */
.navbar-profile-right {
    display: flex;
    align-items: center;
}

/* Underline form styling for registration page */
.underline-form .form-control {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #6c757d !important;
    border-radius: 0 !important;
    padding: 2px 0 !important;
    box-shadow: none !important;
    color: #fff !important;
}

.underline-form .form-control:focus {
    background: transparent !important;
    border-bottom: 2px solid #0d6efd !important;
    box-shadow: none !important;
    outline: none !important;
}

.underline-form .form-control::placeholder {
    color: #adb5bd !important;
    font-weight: 400 !important;
}

.underline-form .form-text {
    color: #adb5bd !important;
    font-size: 0.875rem !important;
}

/* Remove borders from Edit Topic modal */
#topicModal .modal-header {
    border-bottom: none !important;
}

#topicModal .modal-footer {
    border-top: none !important;
}

/* Left-aligned label form styling */
.label-form .form-label {
    color: #fff !important;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
    text-align: left !important;
}

.label-form .form-control {
    background: transparent !important;
    border: 1px solid #495057 !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    color: #fff !important;
    flex: 1 !important;
}

.label-form .form-control:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
    outline: none !important;
}

.label-form .form-control::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

.label-form select.form-control {
    cursor: pointer !important;
}

/* Capitalize first letter of Topic field */
.label-form #topic-title {
    text-transform: capitalize !important;
}

/* Capitalize topic titles in dashboard */
.custom-topic-header h5 {
    text-transform: capitalize !important;
}
}

.label-form select.form-control option {
    background-color: #212529 !important;
    color: #fff !important;
}

.navbar-profile-right .nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem;
    font-size: 1.2rem;
}

.navbar-profile-right .nav-link:hover {
    color: white;
}

.navbar-auth-right .nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem;
}

.navbar-auth-right .nav-link:hover {
    color: white;
}

/* Removed navbar spacer and centering styles */

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Make navbar more mobile-friendly */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    
    /* Improve spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile-friendly buttons */
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Quick report cards - mobile optimizations */
    .quick-report-cards {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .quick-report-cards::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .quick-report-card {
        min-height: 120px;
    }
    
    /* Content cards - mobile friendly with horizontal scroll */
    .content-card {
        min-width: 280px;
        max-width: 320px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .topic-content-container {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .topic-content-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    /* Mobile headers */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    /* Modal improvements for mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    /* Footer improvements */
    .footer-mobile {
        text-align: center;
    }
    
    .footer-mobile .col-md-6 {
        text-align: center !important;
    }
    
    /* Form improvements */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Button group spacing */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
    }
}

/* Health Advisory Items - Horizontal then vertical layout */
.health-advisories-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
}

.advisory-item {
    flex: 0 0 calc(25% - 0.75rem); /* Quarter width minus gap */
    min-width: 280px; /* Minimum readable width */
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    background-color: var(--bs-body-bg);
}

/* Mobile responsiveness for advisory items */
@media (max-width: 768px) {
    .advisory-item {
        flex: 1 1 100%; /* Full width on mobile */
        min-width: auto;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .advisory-item {
        flex: 0 0 calc(50% - 0.75rem); /* Two columns on tablets */
    }
}

@media (min-width: 1201px) and (max-width: 1600px) {
    .advisory-item {
        flex: 0 0 calc(33.333% - 0.75rem); /* Three columns on medium screens */
    }
}

/* Static Add Topic Button at bottom */
.floating-add-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.floating-add-btn {
    padding: 12px 20px;
    font-weight: 600;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: inherit;
}

.floating-add-btn:hover {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none;
}

.floating-add-btn:active {
    transform: none;
}

/* Mobile optimizations for static button */
@media (max-width: 768px) {
    .floating-add-btn-container {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .floating-add-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}
</media>

@media (max-width: 576px) {
    /* Extra small devices */
    .lead {
        font-size: 1rem;
    }
    
    /* Smaller padding for very small screens */
    main {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 0.75rem;
    }
    
    /* Navigation adjustments */
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
}
