/* ========================================
   🎣 NH-VT Fishing Weather Website
   Shared CSS Styles
   ======================================== */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.header {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6, #60a5fa, #93c5fd);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(34, 197, 94, 0.1) 0%, 
        rgba(59, 130, 246, 0.2) 25%, 
        rgba(147, 51, 234, 0.1) 50%, 
        rgba(236, 72, 153, 0.1) 75%, 
        rgba(34, 197, 94, 0.1) 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-image {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.logo-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: -2px;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    opacity: 0.8;
}

/* ========================================
   MAIN CONTENT STYLES
   ======================================== */

main {
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    text-align: center;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 3rem;
}

/* ========================================
   MODULE STYLES
   ======================================== */

.module-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.module-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 1rem;
}

.module-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.module-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ========================================
   CARD STYLES (Exact match from forecast.html)
   ======================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
    flex-shrink: 0;
    gap: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
    margin: 0;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.card-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    gap: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.card-item:last-child {
    border-bottom: none;
}

.card-label {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.875rem;
    flex-shrink: 0;
    min-width: 100px;
}

.card-value {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    text-align: right;
    word-break: break-word;
    hyphens: auto;
}

/* ========================================
   FORECAST CARD STRUCTURE (Exact match from forecast.html)
   ======================================== */

.forecast-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.forecast-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
    flex-shrink: 0;
    gap: 1rem;
}

.forecast-location {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
    margin: 0;
}

.forecast-date {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.forecast-conditions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.forecast-condition-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    gap: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.forecast-condition-item:last-child {
    border-bottom: none;
}

.forecast-condition-label {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.875rem;
    flex-shrink: 0;
    min-width: 120px;
}

.forecast-condition-value {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    text-align: right;
    word-break: break-word;
    hyphens: auto;
}

/* Additional styling for location pages */
.location-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    flex-shrink: 0;
}

.location-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-color);
}

.location-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

/* Enhanced badge styles */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.badge-great { background: #dcfce7; color: #166534; }
.badge-good { background: #fef3c7; color: #92400e; }
.badge-tough { background: #fed7aa; color: #c2410c; }
.badge-stay-home { background: #fee2e2; color: #991b1b; }

/* Table styles with card-like appearance */
.enhanced-table {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.enhanced-table:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.enhanced-table table {
    width: 100%;
    border-collapse: collapse;
}

.enhanced-table th {
    background: var(--gray-50);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.enhanced-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
}

.enhanced-table tr:hover {
    background: var(--gray-50);
}

.enhanced-table tr:last-child td {
    border-bottom: none;
}

/* ========================================
   FORM CONTROLS
   ======================================== */

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    color: var(--gray-700);
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.refresh-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn:hover {
    background: var(--secondary-color);
}

/* ========================================
   LOADING & ERROR STATES
   ======================================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--gray-500);
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .module-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .module-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .enhanced-table {
        overflow-x: auto;
    }
    
    .enhanced-table th,
    .enhanced-table td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}
