/* Photography Dashboard Styles */

.cc-photography-dashboard {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    /* Background inherited from body.dashboard */
}

/* ==========================================================================
   Dashboard Header (Consistent with calima dashboard)
   ========================================================================== */

.cc-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-glass-dark);
    backdrop-filter: var(--blur-glass);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-amber);
}

.cc-header-content h1 {
    margin: 0 0 5px 0;
    font-size: 32px;
    color: var(--accent-amber);
    font-family: var(--font-heading);
    font-weight: 700;
}

.cc-header-content h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: var(--accent-amber);
    font-family: var(--font-heading);
    font-weight: 600;
}

.cc-header-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary-dark);
}

.cc-header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ==========================================================================
   Dashboard Container (Consistent Layout)
   ========================================================================== */

.cc-dashboard-container {
    display: flex;
    background: rgba(26, 28, 30, 0.6);
    backdrop-filter: var(--blur-glass);
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-amber);
    min-height: 80vh;
}

/* ==========================================================================
   Sidebar (Unified Design)
   ========================================================================== */

.cc-sidebar {
    width: 320px;
    padding: 25px;
    background: var(--bg-overlay-dark);
    border-right: 1px solid var(--border-amber);
    overflow-y: auto;
    flex-shrink: 0;
}

.cc-sidebar h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--accent-amber);
    font-family: var(--font-heading);
    font-weight: 600;
    border-bottom: 2px solid var(--accent-amber);
    padding-bottom: 8px;
}

/* Filters Section */
.cc-filters {
    margin-bottom: 25px;
}

.cc-filter-group {
    margin-bottom: 15px;
}

.cc-filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--text-primary-dark);
    margin-bottom: 6px;
}

.cc-filter-group select,
.cc-filter-group input[type="range"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-amber-strong);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--bg-glass-light);
    color: var(--bg-white);
}

.cc-filter-group select option {
    background: var(--bg-volcanic);
    color: var(--bg-white);
}

.cc-filter-group input[type="checkbox"] {
    margin-right: 8px;
}

.cc-range-value {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-amber);
}

/* ==========================================================================
   Legend (Unified Design)
   ========================================================================== */

.cc-legend {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-glass-dark);
    backdrop-filter: var(--blur-glass);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-amber);
    box-shadow: var(--shadow-soft);
}

.cc-legend-content {
    margin-top: 10px;
}

.cc-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-primary-dark);
}

.cc-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Stats (Unified Design)
   ========================================================================== */

.cc-stats {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-glass-dark);
    backdrop-filter: var(--blur-glass);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-amber);
    box-shadow: var(--shadow-soft);
}

.cc-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
}

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

.cc-stat-label {
    color: var(--text-secondary-dark);
    font-weight: 500;
}

.cc-stat-value {
    color: var(--accent-amber);
    font-weight: 700;
    font-family: var(--font-data);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.cc-btn {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    font-family: var(--font-body);
}

.cc-btn-primary {
    background: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-amber-hover) 100%);
    color: var(--bg-volcanic);
    box-shadow: var(--shadow-soft);
}

.cc-btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-amber-hover) 0%, var(--accent-amber) 100%);
    box-shadow: var(--shadow-amber);
}

.cc-btn-secondary {
    background: var(--bg-glass-light);
    color: var(--text-primary-dark);
    border: 1px solid var(--border-amber);
}

.cc-btn-secondary:hover {
    background: var(--bg-glass-lighter);
    border-color: var(--accent-amber);
}

/* ==========================================================================
   Map Wrapper (Unified Design)
   ========================================================================== */

.cc-map-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cc-map-container {
    flex: 1;
    position: relative;
    min-height: 500px;
}

#cc-photo-map {
    width: 100%;
    height: 100%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

.cc-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 28, 30, 0.9);
    backdrop-filter: var(--blur-glass);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: var(--border-radius);
}

.cc-loading-overlay.hidden {
    display: none;
}

.cc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-amber);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cc-loading-overlay p {
    margin-top: 20px;
    color: var(--text-primary-dark);
    font-size: 16px;
    font-family: var(--font-heading);
}

/* ==========================================================================
   Leaflet Popup Customization
   ========================================================================== */

.leaflet-popup-content-wrapper {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    background: var(--bg-glass-dark);
    backdrop-filter: var(--blur-glass);
    border: 1px solid var(--border-amber);
}

.cc-spot-popup {
    padding: 10px;
    min-width: 250px;
    color: var(--text-primary-dark);
}

.cc-spot-popup h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--accent-amber);
    font-family: var(--font-heading);
}

.cc-metadata {
    margin: 10px 0;
    padding: 10px;
    background: var(--bg-glass-lighter);
    backdrop-filter: var(--blur-glass-light);
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    color: var(--text-secondary-dark);
}

.btn-view-details {
    display: block;
    margin-top: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-amber-strong) 100%);
    color: var(--bg-volcanic);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.leaflet-container a.btn-view-details {
    color: var(--bg-volcanic);
}

.btn-view-details:hover {
    background: linear-gradient(135deg, var(--accent-amber-strong) 0%, var(--accent-amber) 100%);
    box-shadow: var(--shadow-medium);
    color: var(--bg-volcanic);
}

/* ==========================================================================
   Responsive Design (Matching calima dashboard)
   ========================================================================== */

@media (max-width: 1200px) {
    .cc-sidebar {
        width: 280px;
    }
}

@media (max-width: 992px) {
    .cc-dashboard-container {
        flex-direction: column-reverse;
    }

    .cc-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-amber);
    }

    .cc-map-wrapper {
        min-height: 80vh;
    }

    #cc-photo-map {
        border-top-left-radius: var(--border-radius);
        border-top-right-radius: var(--border-radius);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}

@media (max-width: 768px) {
    .cc-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cc-header-controls {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .cc-photography-dashboard {
        padding: 10px;
    }

    .cc-dashboard-header {
        padding: 15px;
    }

    .cc-header-content h1 {
        font-size: 24px;
    }

    .cc-header-content h2 {
        font-size: 22px;
    }

    .cc-sidebar {
        padding: 15px;
    }

    .cc-filters,
    .cc-legend,
    .cc-stats {
        padding: 15px;
    }
}

/* ==========================================================================
   SEO Location List Styles
   ========================================================================== */

.cc-seo-location-list {
    width: 100%;
    max-width: 100%;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(26, 28, 30, 0.95) 0%, rgba(18, 20, 22, 0.98) 100%);
    margin-bottom: 40px;
}

.cc-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-amber);
}

.cc-list-header h2 {
    margin: 0;
    font-size: 28px;
    color: var(--accent-amber);
    font-family: var(--font-heading);
    font-weight: 700;
}

.cc-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-glass-dark);
    border: 1px solid var(--accent-amber);
    border-radius: var(--border-radius);
    color: var(--text-primary-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cc-toggle-btn:hover {
    background: var(--accent-amber);
    color: var(--bg-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.cc-toggle-btn[aria-expanded="true"] .toggle-text-show,
.cc-toggle-btn[aria-expanded="false"] .toggle-text-hide {
    display: none;
}

.cc-toggle-btn[aria-expanded="false"] .toggle-icon {
    transform: rotate(-90deg);
}

.cc-toggle-icon {
    transition: transform 0.3s ease;
}

.cc-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    opacity: 1;
    max-height: none;
    overflow: visible;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.cc-locations-grid.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.cc-location-card {
    background: var(--bg-glass-dark);
    border: 1px solid var(--border-amber);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.cc-location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.2);
    border-color: var(--accent-amber);
}

.cc-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cc-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(42, 46, 52, 0.8), rgba(26, 28, 30, 0.9));
}

.cc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cc-location-card:hover .cc-card-image img {
    transform: scale(1.1);
}

.cc-score-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
}

.cc-score-badge {
    display: inline-flex;
    align-items: baseline;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-amber);
    backdrop-filter: blur(10px);
}

.cc-score-badge .score-max {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 2px;
}

.cc-card-content {
    padding: 20px;
}

.cc-card-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary-dark);
    font-family: var(--font-heading);
    line-height: 1.3;
}

.cc-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.cc-category {
    font-size: 12px;
    color: var(--accent-amber);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cc-live-data {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.cc-score-label {
    color: var(--text-secondary-dark);
    font-weight: 500;
}

.cc-live-indicator {
    font-size: 14px;
    cursor: help;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.cc-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cc-feature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary-dark);
}

.cc-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cc-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary-dark);
}

.cc-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary-dark);
    font-size: 16px;
}

/* Hiking-specific styles */
.cc-trail-card .cc-safety-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
}

.cc-safety-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    font-size: 18px;
    backdrop-filter: blur(10px);
}

.safety-safe .cc-safety-badge {
    color: #10b981;
    border: 2px solid #10b981;
}

.safety-caution .cc-safety-badge {
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.safety-unsafe .cc-safety-badge {
    color: #ef4444;
    border: 2px solid #ef4444;
}

.cc-difficulty {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cc-difficulty-easy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.cc-difficulty-moderate {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.cc-difficulty-difficult,
.cc-difficulty-expert {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.cc-safety-status {
    font-weight: 600;
}

.cc-safety-status.safety-safe {
    color: #10b981;
}

.cc-safety-status.safety-caution {
    color: #f59e0b;
}

.cc-safety-status.safety-unsafe {
    color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cc-locations-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .cc-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cc-list-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    
    .cc-seo-location-list {
        padding: 30px 0;
    }
}
