/* Carmen Marine Cooperative - Site Styles */

:root {
    --primary-color: #0056b3; /* A deeper blue for a more professional feel */
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #343a40; /* Slightly lighter dark for better contrast */
    --hero-bg-opacity: 0.05; /* Adjustable opacity for hero background pattern */
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* Navigation */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* Add a subtle shadow */
}

.navbar-brand {
    font-weight: 700; /* Bolder brand name */
    font-size: 1.35rem; /* Slightly larger brand name */
}

/* Hero Section */
.hero-section {
    padding: 5rem 0; /* Increased padding for more impact */
    background: linear-gradient(135deg, #141418 0%, #7f8893 100%); /* New gradient */
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: url('../assets/images/hero-loop-city.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    opacity: var(--hero-bg-opacity);
    z-index: 0;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

@keyframes scrollBackground {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.hero-section h1 {
    color: white;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.hero-section p {
    color: rgba(255, 255, 255, 0.85);
}

/* Cards */
.card {
    border: none; /* Remove border for a cleaner look */
    border-radius: 0.75rem; /* Slightly more rounded corners */
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05); /* Softer shadow */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Disable hover effect on cards containing forms or other interactive elements */
.report-form-section .card:hover,
.order-section .card:hover,
.heatmap-section .card:hover {
    transform: none;
}

.card-title {
    color: var(--primary-color);
}

/* Sections */
.updates-section {
    background: #d5d5d5;
}

.community-section {
    background: var(--light-color);
}

.page-header {
    border-bottom: 3px solid var(--primary-color);
}

.buffer {
    margin-bottom: 1rem;
}

/* Pest Information Cards */
.pest-info-section .card {
    height: 100%;
}

.pest-info-section .border-danger {
    border-width: 2px;
}

/* Pest Selector (Radio Buttons styled as Cards) */
.pest-selector .btn-check:checked + label {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.pest-selector label {
    cursor: pointer;
    transition: all 0.3s ease;
    border-width: 2px;
}

.pest-selector label:hover {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Report Form */
.report-form-section {
    background-color: #e8e9eb;
}

.report-form-section .card {
    max-width: 100%;
}

/* Parking Form & Waitlist */
.parking-form-section .card:hover {
    transform: none;
}

#waitlistTable th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#waitlistTable td {
    vertical-align: middle;
    font-size: 0.95rem;
}

#waitlistTable .table-dark th {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Assigned rows are visually dimmed */
#waitlistTable tr.waitlist-assigned {
    opacity: 0.55;
    background-color: #f0f0f0;
}

#waitlistTable tr.waitlist-assigned td {
    text-decoration: line-through;
    text-decoration-color: rgba(0,0,0,0.3);
}

/* Don't strike through the status and assigned-date columns */
#waitlistTable tr.waitlist-assigned td:nth-child(5),
#waitlistTable tr.waitlist-assigned td:nth-child(6) {
    text-decoration: none;
}

/* Badge spacing inside table cells */
#waitlistTable .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.6em;
}

#waitlistTable .badge + .badge {
    margin-left: 0.3rem;
}

/* Dropdown menu styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1.25rem;
    transition: background-color 0.15s;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Photo Upload Button */
#cameraButton {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
}

#cameraButton:hover {
    background-color: #218838;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

#cameraButton:active {
    transform: scale(0.98);
}

#cameraButton img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

/* Photo Preview */
#photoPreview .d-flex {
    background-color: #d4edda;
    border-radius: 8px;
    border: 2px solid #28a745;
}

#photoPreview span:first-child {
    font-size: 1.5rem;
    margin-right: 10px;
}

#photoFileName {
    font-weight: 600;
    font-size: 1rem;
}

/* Photo Selection Modal - Center Justified */
.photo-modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 3.5rem);
}

.photo-modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.photo-modal-header {
    border-bottom: 2px solid #dee2e6;
    padding: 20px;
}

.photo-modal-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.photo-modal-body {
    padding: 0;
}

.photo-option-btn {
    border: none;
    background-color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.photo-option-btn:hover {
    background-color: #f8f9fa;
}

.photo-option-btn:active {
    background-color: #e9ecef;
}

.photo-option-btn:first-child {
    border-bottom: 1px solid #dee2e6;
}

.photo-option-btn img {
    width: 40px;
    height: 40px;
    margin-right: 20px;
}

.photo-option-btn span {
    font-weight: 500;
}

/* Building Visualization */
#buildingVisualization {
    background: #f8f9fa;
    border-radius: 0.5rem;
    overflow: hidden;
}

#buildingVisualization canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.heatmap-gradient {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Statistics Display */
.stat-box {
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--light-color);
    margin: 0.5rem 0;
}

#statsDisplay .stat-box:hover {
    background: #e9ecef;
}

/* Footer */
.footer {
    /*margin-top: 4rem; /* Increased margin */
    background-color: var(--dark-color); /* Use the new dark color */
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    border-radius: 0.5rem;
    border-left-width: 4px;
}

.alert-info {
    border-left-color: var(--info-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.75rem; /* Slightly larger padding */
    border-radius: .375;
    font-weight: 600; /* Bolder text */
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

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

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

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    #buildingVisualization {
        height: 400px !important;
    }
    
    .pest-selector .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    #buildingVisualization {
        height: 300px !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    #buildingVisualization {
        display: none;
    }
    
    .hero-section {
        background: white;
        color: black;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed in the future */
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.rounded {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* Image Placeholder */
img[src*="placeholder"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Building Placeholder Box */
.building-placeholder-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.building-placeholder-box .placeholder-content {
    text-align: center;
}

.building-placeholder-box h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.building-placeholder-box p {
    font-size: 1.25rem;
    margin: 0;
    opacity: 0.9;
}
