/**
 * Fontaines Directory - Frontend Styles
 * Uses native Breakdance classes - requires Breakdance form on page for styles
 */

/* ==========================================================================
   FD Fountain Form Specific Styles
   ========================================================================== */

/* Location search */
.fd-location-search {
    display: flex;
    width: 100%;
    gap: 10px;
    margin-bottom: 15px;
}

.fd-location-search .breakdance-form-field__input {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.fd-location-search .button-atom {
    flex-shrink: 0;
}

/* Map container */
.fd-form-map {
    width: 100%;
    height: 350px;
    border-radius: var(--fd-radius, 8px);
    border: 1px solid var(--fd-border, #dee2e6);
    margin-bottom: 10px;
}

/* Coordinates display */
.fd-coordinates-display {
    font-size: 14px;
    color: var(--fd-text-muted, #6c757d);
    min-height: 20px;
}

/* Photo preview grid */
.fd-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.fd-photo-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--fd-radius, 8px);
    overflow: hidden;
    box-shadow: var(--fd-shadow, 0 2px 4px rgba(0, 0, 0, 0.1));
}

.fd-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fd-photo-item .fd-remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-photo-item .fd-remove-photo:hover {
    background: var(--fd-danger, #dc3545);
}

/* Form notice */
.fd-form-notice {
    grid-column: span 12;
    margin-top: 20px;
    padding-top: 20px;
    font-size: 14px;
    color: var(--fd-text-muted, #6c757d);
    text-align: center;
    border-top: 1px solid var(--fd-border, #dee2e6);
}

/* Loading state */
.fd-btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--fd-text-muted, #6c757d);
}

/* Spinner */
.fd-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fd-spin 0.8s linear infinite;
}

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

/* Honeypot - completely hidden */
.fd-honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
}

/* Form messages */
.fd-form-messages {
    grid-column: span 12;
    margin-bottom: 10px;
}

.fd-notice {
    padding: 15px 20px;
    border-radius: var(--fd-radius, 8px);
    margin-bottom: 15px;
}

.fd-notice-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #5a1218;
}

.fd-notice-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #0f3d1c;
}

/* Login required */
.fd-login-required {
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
}

.fd-login-required .fd-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .fd-location-search {
        flex-direction: column;
    }

    .fd-form-map {
        height: 280px;
    }
}
/* ==========================================================================
   Variables
   ========================================================================== */

:root {
    --fd-primary: #00324d;
    --fd-primary-hover: #004a73;
    --fd-secondary: #6c757d;
    --fd-success: #28a745;
    --fd-success-dark: #1e7e34;
    --fd-warning: #ffc107;
    --fd-warning-dark: #d39e00;
    --fd-danger: #dc3545;
    --fd-danger-dark: #bd2130;
    --fd-info: #17a2b8;
    --fd-info-dark: #117a8b;
    --fd-light: #f8f9fa;
    --fd-dark: #343a40;
    --fd-border: #dee2e6;
    --fd-text: #212529;
    --fd-text-muted: #6c757d;
    --fd-radius: 8px;
    --fd-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --fd-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --fd-transition: 0.2s ease;
    --fd-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --fd-font-size-base: 1rem;
    --fd-font-size-lg: 1.125rem;
    --fd-font-size-sm: 0.875rem;
    --fd-font-weight-titles: 600;
    --fd-list-card-title-size: 16px;
    --fd-touch-target: 44px;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Base Elements
   ========================================================================== */

.fd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--fd-font-family);
    font-size: var(--fd-font-size-base);
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    border: none;
    border-radius: var(--fd-radius);
    cursor: pointer;
    transition: all var(--fd-transition);
}

.fd-button-primary {
    background-color: var(--fd-primary);
    color: #fff;
}

.fd-button-primary:hover {
    background-color: var(--fd-primary-hover);
    color: #fff;
}

.fd-button-secondary {
    background-color: var(--fd-light);
    color: var(--fd-text);
    border: 1px solid var(--fd-border);
}

.fd-button-secondary:hover {
    background-color: var(--fd-border);
}

.fd-button-large {
    padding: 16px 32px;
    font-size: var(--fd-font-size-lg);
}

.fd-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.fd-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--fd-font-family);
}

.fd-form {
    background: #fff;
    padding: 30px;
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow);
}

.fd-form-group {
    margin-bottom: 24px;
}

.fd-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--fd-text);
}

.fd-form-group label .required {
    color: var(--fd-danger);
}

.fd-input,
.fd-textarea,
.fd-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    background-color: #fff;
    transition: border-color var(--fd-transition), box-shadow var(--fd-transition);
}

.fd-input:focus,
.fd-textarea:focus,
.fd-select:focus {
    outline: none;
    border-color: var(--fd-primary);
    box-shadow: 0 0 0 3px rgba(0, 50, 77, 0.1);
}

.fd-textarea {
    resize: vertical;
    min-height: 120px;
}

.fd-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.fd-field-hint {
    margin-top: 6px;
    font-size: 14px;
    color: var(--fd-text-muted);
}

.fd-form-group .fd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.fd-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ==========================================================================
   Location Search & Map
   ========================================================================== */

.fd-location-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.fd-location-search .fd-input {
    flex: 1;
}

.fd-form-map {
    width: 100%;
    height: 350px;
    border-radius: var(--fd-radius);
    border: 1px solid var(--fd-border);
    margin-bottom: 10px;
}

.fd-coordinates-display {
    font-size: 14px;
    color: var(--fd-text-muted);
    min-height: 20px;
}

.fd-coordinates-display span {
    font-family: monospace;
}

/* ==========================================================================
   Photo Upload
   ========================================================================== */

.fd-photo-upload {
    margin-bottom: 10px;
}

.fd-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.fd-photo-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--fd-radius);
    overflow: hidden;
    box-shadow: var(--fd-shadow);
}

.fd-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fd-photo-item .fd-remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-photo-item .fd-remove-photo:hover {
    background: var(--fd-danger);
}

.fd-photo-item.fd-uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-dropzone {
    position: relative;
    border: 2px dashed var(--fd-border);
    border-radius: var(--fd-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all var(--fd-transition);
}

.fd-dropzone:hover,
.fd-dropzone.fd-dragover {
    border-color: var(--fd-primary);
    background-color: rgba(0, 50, 77, 0.02);
}

.fd-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.fd-dropzone-content .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--fd-text-muted);
    margin-bottom: 10px;
}

.fd-dropzone-content p {
    margin: 0;
    color: var(--fd-text-muted);
}

/* ==========================================================================
   Form Submit
   ========================================================================== */

.fd-form-submit {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--fd-border);
}

.fd-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fd-spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Form Messages
   ========================================================================== */

.fd-form-messages {
    margin-bottom: 20px;
}

.fd-notice {
    padding: 15px 20px;
    border-radius: var(--fd-radius);
    margin-bottom: 15px;
}

.fd-notice-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #5a1218;
}

.fd-notice-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #0f3d1c;
}

.fd-notice-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #084a5c;
}

/* ==========================================================================
   Success Page - Breakdance Compatible
   ========================================================================== */

.fd-success-section {
    padding: 60px 20px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-success-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow);
    text-align: center;
}

.fd-success-icon {
    margin-bottom: 20px;
}

.fd-success-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: var(--fd-success);
}

.fd-success-title {
    margin: 0 0 15px;
    font-size: 28px;
    color: var(--fd-text);
}

.fd-success-message {
    margin-bottom: 30px;
    font-size: 16px;
    color: var(--fd-text-muted);
    line-height: 1.6;
}

.fd-success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* Breakdance button wrapper */
.fd-success-actions .bde-button {
    width: 100%;
    max-width: 280px;
}

/* Success style button (green) */
.fd-btn-success {
    background-color: var(--fd-success) !important;
    border-color: var(--fd-success) !important;
}

.fd-btn-success:hover {
    background-color: var(--fd-success-dark, #1e7e34) !important;
    border-color: var(--fd-success-dark, #1e7e34) !important;
}

/* ==========================================================================
   Login Required
   ========================================================================== */

.fd-login-required {
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
}

.fd-login-required .fd-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
}

/* ==========================================================================
   Public Map
   ========================================================================== */

.fd-map-container {
    margin: 20px 0;
}

.fd-public-map {
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow);
}

.fd-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 15px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
    .fd-map-legend {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

.fd-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fd-text);
}

.fd-legend-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
}

.fd-legend-marker::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.fd-legend-marker.fd-status-functional,
.fd-status-badge.fd-status-functional {
    background-color: var(--fd-success);
    color: var(--fd-success);
}

.fd-legend-marker.fd-status-out_of_order,
.fd-status-badge.fd-status-out_of_order {
    background-color: var(--fd-danger);
    color: var(--fd-danger);
}

.fd-legend-marker.fd-status-seasonal,
.fd-status-badge.fd-status-seasonal {
    background-color: var(--fd-warning);
    color: var(--fd-warning);
}

.fd-legend-marker.fd-status-unknown,
.fd-status-badge.fd-status-unknown {
    background-color: var(--fd-secondary);
    color: var(--fd-secondary);
}

/* Map Popup */
.fd-map-popup {
    min-width: 260px;
    max-width: 320px;
    font-family: var(--fd-font-family);
    padding-bottom: 0;
}

/* Align popup content margins with thumbnail bleed to avoid right gap */
.leaflet-popup.fd-map-popup .leaflet-popup-content {
    margin: 13px 20px;
}

/* Remove Leaflet wrapper padding for full-bleed thumbnail */
.leaflet-popup.fd-map-popup .leaflet-popup-content-wrapper {
    padding: 0;
}

/* Popup container with modern design */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.leaflet-popup-tip {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fd-popup-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin: -13px -20px 16px;
    width: calc(100% + 40px);
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* No hover zoom inside map popups to avoid layout gaps */
.fd-popup-thumbnail:hover {
    transform: none;
}

/* Placeholder for missing popup images */
.fd-popup-placeholder {
    background: linear-gradient(135deg, var(--fd-light) 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fd-popup-placeholder::before {
    content: '💧';
    font-size: 48px;
    opacity: 0.3;
    position: absolute;
}

.fd-popup-content {
    padding: 0;
}

.fd-popup-header {
    position: relative;
    margin-bottom: 12px;
}

.fd-popup-status-badge {
    position: absolute;
    top: -8px;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.fd-popup-status-badge::before {
    content: '●';
    font-size: 8px;
    opacity: 0.9;
}

.fd-popup-status-badge[data-status="seasonal"] {
    color: #333;
    box-shadow: 0 4px 12px rgba(211, 158, 0, 0.3);
}

.fd-popup-title {
    margin: 0 0 10px;
    padding-right: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.fd-popup-title a {
    color: var(--fd-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fd-popup-title a:hover {
    color: var(--fd-primary);
}

.fd-popup-address {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--fd-text-muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
}

.fd-popup-address .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--fd-info);
    margin-top: 2px;
}

.fd-popup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.fd-popup-type-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fd-text);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.fd-popup-type-tag:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.fd-popup-status-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fd-text);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.fd-popup-status-tag::before {
    content: none;
}

.fd-popup-accessibility {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fd-info);
    background: rgba(23, 162, 184, 0.08);
    border-radius: 8px;
    text-transform: none;
    letter-spacing: 0;
}

.fd-popup-accessibility .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.fd-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Improve popup link contrast and style */
.fd-popup-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    background: var(--fd-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 50, 77, 0.25);
}

@media (hover: none) and (pointer: coarse) {
    .fd-list-card:hover {
        transform: none;
    }

    .fd-list-card:hover .fd-list-card-thumb {
        transform: none;
    }
}

@media (max-width: 1024px) {
    .fd-list-items {
        padding: 12px;
    }

    .fd-list-card {
        padding: 14px;
    }
}

@media (max-width: 768px) {
    .fd-map-popup {
        min-width: 220px;
        max-width: 260px;
    }

    .fd-popup-thumbnail {
        height: 140px;
    }

    .fd-directory-map .fd-map-legend {
        left: 12px;
        bottom: 12px;
        padding: 8px 10px;
        gap: 10px;
        font-size: 12px;
    }

    /* Ensure popups stay visible when list is open */
    .fd-directory-container:not(.fd-list-collapsed) .leaflet-popup {
        max-width: calc(100% - var(--fd-list-width) - 40px) !important;
    }

    .fd-directory-container:not(.fd-list-collapsed) .fd-map-popup {
        max-width: min(260px, calc(100% - var(--fd-list-width) - 40px));
    }
}

.fd-popup-link:hover {
    background: var(--fd-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 50, 77, 0.35);
    text-decoration: none;
    color: #fff;
}

.fd-popup-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 50, 77, 0.25);
}

.fd-popup-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.fd-popup-link:hover .dashicons {
    transform: translateX(2px);
}

.fd-popup-secondary-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fd-text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.fd-popup-secondary-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--fd-text);
}

.fd-popup-secondary-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Popup loading state */
.fd-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--fd-text-muted);
}

.fd-popup-loading .fd-spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

/* Popup animations */
.leaflet-popup-content-wrapper {
    animation: fd-popup-fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fd-popup-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Popup close animation */
.leaflet-popup-content-wrapper.closing {
    animation: fd-popup-fadeOut 0.2s ease-out;
}

@keyframes fd-popup-fadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* Stagger animation for multiple popups */
.fd-popup-content > * {
    animation: fd-popup-slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.fd-popup-content > *:nth-child(1) { animation-delay: 0.05s; }
.fd-popup-content > *:nth-child(2) { animation-delay: 0.1s; }
.fd-popup-content > *:nth-child(3) { animation-delay: 0.15s; }
.fd-popup-content > *:nth-child(4) { animation-delay: 0.2s; }
.fd-popup-content > *:nth-child(5) { animation-delay: 0.25s; }

@keyframes fd-popup-slideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Fountain List
   ========================================================================== */

.fd-fountain-list {
    display: grid;
    gap: 20px;
    font-family: var(--fd-font-family);
}

.fd-fountain-list.fd-columns-1 {
    grid-template-columns: 1fr;
}

.fd-fountain-list.fd-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.fd-fountain-list.fd-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fd-fountain-list.fd-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .fd-fountain-list.fd-columns-2,
    .fd-fountain-list.fd-columns-3,
    .fd-fountain-list.fd-columns-4 {
        grid-template-columns: 1fr;
    }
}

.fd-fountain-card {
    background: #fff;
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow);
    overflow: hidden;
    transition: box-shadow var(--fd-transition);
}

.fd-fountain-card:hover {
    box-shadow: var(--fd-shadow-lg);
}

.fd-fountain-thumbnail {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.fd-fountain-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--fd-transition);
}

.fd-fountain-card:hover .fd-fountain-thumbnail img {
    transform: scale(1.05);
}

.fd-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    color: #fff;
}

.fd-fountain-content {
    padding: 20px;
}

.fd-fountain-title {
    margin: 0 0 10px;
    font-size: var(--fd-font-size-lg);
    font-weight: var(--fd-font-weight-titles);
}

.fd-fountain-title a {
    color: var(--fd-text);
    text-decoration: none;
}

.fd-fountain-title a:hover {
    color: var(--fd-primary);
}

.fd-fountain-address {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 0 0 10px;
    font-size: var(--fd-font-size-sm);
    color: var(--fd-text-muted);
}

.fd-fountain-address .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.fd-fountain-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.fd-type-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    background: var(--fd-light);
    border-radius: 20px;
    color: var(--fd-text-muted);
}

.fd-fountain-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fd-accessibility {
    color: var(--fd-info);
}

.fd-map-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 14px;
    color: var(--fd-primary);
    text-decoration: none;
}

.fd-map-link:hover {
    text-decoration: underline;
}

.fd-map-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.fd-no-fountains {
    padding: 40px;
    text-align: center;
    background: var(--fd-light);
    border-radius: var(--fd-radius);
    color: var(--fd-text-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .fd-form-container {
        padding: 10px;
    }

    .fd-form {
        padding: 20px;
    }

    .fd-location-search {
        flex-direction: column;
    }

    .fd-form-map {
        height: 280px;
    }

    .fd-success-container {
        margin: 20px;
        padding: 30px 20px;
    }

    .fd-map-legend {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==========================================================================
   Directory View - Two Column Layout with Floating Filters
   ========================================================================== */

.fd-directory-container {
    --fd-header-height: 80px;
    --fd-list-left: 16px;
    --fd-list-width: 460px;
    --fd-list-gap: 16px;
    --fd-control-gap: 12px;
    --fd-toggle-size: 63px;
    display: flex;
    height: calc(100vh - var(--fd-header-height));
    font-family: var(--fd-font-family);
    width: 100%;
    background: #fff;
    position: relative;
    overflow: hidden;
    z-index: 0; /* Stacking context under nav dropdown */
}

/* ==========================================================================
   Floating Filters Bar
   ========================================================================== */

.fd-filters-bar {
    position: absolute;
    top: 16px;
    left: calc(var(--fd-list-left) + var(--fd-list-width) + var(--fd-list-gap) + var(--fd-toggle-size) + var(--fd-control-gap));
    right: 16px;
    z-index: 1000;
    pointer-events: none;
    transition: left 0.25s ease;
}

.fd-filter-hidden {
    display: none !important;
}

.fd-filters-bar-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: calc(var(--fd-radius) + 4px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    flex-wrap: wrap;
    border: 1px solid rgba(0, 0, 0, 0.06);
    max-width: fit-content;
    min-height: 63px;
}

/* Backdrop filter with fallback for unsupported browsers */
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
    .fd-filters-bar-inner {
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

/* Search in filters bar */
.fd-filter-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 160px;
    padding: 4px 8px;
    background: rgba(0, 50, 77, 0.03);
    border-radius: calc(var(--fd-radius) - 2px);
    transition: all 0.2s ease;
}

.fd-filter-search-wrap:focus-within {
    background: rgba(0, 50, 77, 0.06);
    box-shadow: inset 0 0 0 2px rgba(0, 50, 77, 0.1);
}

.fd-filter-search-wrap .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--fd-text-muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.fd-filter-search-wrap:focus-within .dashicons {
    color: var(--fd-primary);
}

.fd-filters-bar .fd-search-input {
    border: none;
    background: transparent;
    padding: 6px 4px;
    font-size: 14px;
    width: 100%;
    outline: none;
    box-shadow: none;
    font-weight: 500;
}

.fd-filters-bar .fd-search-input:focus {
    box-shadow: none;
    border: none;
}

.fd-filters-bar .fd-search-input::placeholder {
    color: var(--fd-text-muted);
    font-weight: 400;
}

/* Geocode banner */
.fd-geocode-banner {
    width: 100%;
    padding: 6px 12px;
    background: #f0f6ff;
    border-left: 3px solid #4a90d9;
    color: #2c5f8a;
    font-size: 0.85rem;
    border-radius: 0 4px 4px 0;
    margin-top: 4px;
}

/* Dropdown Filter */
.fd-filter-dropdown {
    position: relative;
}

.fd-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--fd-touch-target);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fd-text);
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: calc(var(--fd-radius) - 2px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.fd-filter-trigger:focus-visible {
    outline: 2px solid rgba(0, 50, 77, 0.2);
    outline-offset: 2px;
}

.fd-filter-trigger:hover {
    border-color: var(--fd-primary);
    background: rgba(0, 50, 77, 0.02);
    transform: translateY(-1px);
}

.fd-filter-dropdown.open .fd-filter-trigger {
    border-color: var(--fd-primary);
    background: var(--fd-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 50, 77, 0.25);
}

.fd-filter-trigger-count {
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: var(--fd-primary);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 50, 77, 0.2);
}

.fd-directory-map .leaflet-top.leaflet-left,
.fd-directory-map .leaflet-top.leaflet-right {
    top: 76px;
}

.fd-filter-trigger-count.visible {
    display: inline-block;
}

/* Dropdown arrow */
.fd-filter-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.fd-filter-dropdown.open .fd-filter-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Dropdown Menu */
.fd-filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: calc(var(--fd-radius) + 2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.96);
    transform-origin: top left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.fd-filter-dropdown.open .fd-filter-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.fd-dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--fd-text);
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 0;
}

.fd-dropdown-option:hover {
    background: rgba(0, 50, 77, 0.04);
}

.fd-dropdown-option:active {
    background: rgba(0, 50, 77, 0.08);
}

.fd-dropdown-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--fd-primary);
    flex-shrink: 0;
    border-radius: 4px;
}

.fd-checkbox-custom {
    display: none;
}

/* PMR Toggle */
.fd-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--fd-touch-target);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fd-text-muted);
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: calc(var(--fd-radius) - 2px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    margin: 0;
}

.fd-filter-toggle:hover {
    border-color: var(--fd-primary);
    color: var(--fd-text);
    transform: translateY(-1px);
}

.fd-filter-toggle:has(input:checked),
.fd-filter-toggle.fd-active {
    background: var(--fd-primary);
    color: #fff;
    border-color: var(--fd-primary);
    box-shadow: 0 4px 12px rgba(0, 50, 77, 0.25);
}

.fd-filter-toggle input[type="checkbox"] {
    display: none;
}

/* Reset button in bar */
.fd-filters-bar .fd-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    color: var(--fd-text-muted);
    cursor: pointer;
    border-radius: calc(var(--fd-radius) - 2px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.fd-filters-bar .fd-filter-reset:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--fd-danger);
    border-color: rgba(220, 53, 69, 0.2);
    transform: translateY(-1px);
}

.fd-filters-bar .fd-filter-reset:active {
    transform: translateY(0);
}

.fd-filters-bar .fd-filter-reset .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Legacy filter styles (kept for mobile panel) */
.fd-filter-group {
    margin-bottom: 24px;
}

.fd-filter-group:last-child {
    margin-bottom: 0;
}

.fd-filter-group > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fd-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.fd-search-input {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--fd-font-family);
    font-size: var(--fd-font-size-sm);
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    background: #fff;
    transition: border-color var(--fd-transition), box-shadow var(--fd-transition);
}

.fd-search-input:focus {
    outline: none;
    border-color: var(--fd-primary);
    box-shadow: 0 0 0 3px rgba(0, 50, 77, 0.1);
}

/* Mobile filter panel checkboxes */
.fd-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fd-filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--fd-text);
    cursor: pointer;
}

.fd-filter-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--fd-primary);
}

/* List Column */
.fd-directory-list {
    width: 460px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--fd-border);
    background: #fff;
    flex-shrink: 0;
    position: absolute;
    top: 16px;
    left: var(--fd-list-left);
    bottom: 16px;
    height: auto;
    z-index: 900;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease;
    border-radius: 16px;
    overflow: hidden;
}

.fd-directory-container.fd-list-collapsed .fd-directory-list {
    transform: translateX(calc(-100% - var(--fd-list-left)));
    border-right: none;
}

.fd-directory-container.fd-list-collapsed .fd-directory-list * {
    pointer-events: none;
}

.fd-list-header {
    padding: 15px 20px;
    background: var(--fd-light);
    border-bottom: 1px solid var(--fd-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fd-list-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--fd-text);
}

.fd-list-sort {
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    background: #fff;
    cursor: pointer;
}


.fd-list-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.fd-list-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--fd-text-muted);
}

.fd-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--fd-text-muted);
}

.fd-list-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* List Card */
.fd-list-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fff 0%, #fff 100%);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--fd-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.fd-list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fd-primary), var(--fd-info));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fd-list-card:hover {
    box-shadow: 0 8px 24px rgba(0, 50, 77, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 50, 77, 0.25);
    transform: translateY(-4px) translateX(4px);
    background: linear-gradient(135deg, #fff 0%, rgba(0, 50, 77, 0.02) 100%);
}

.fd-list-card:hover::before {
    opacity: 1;
}

.fd-list-card.active {
    box-shadow: 0 8px 32px rgba(0, 50, 77, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--fd-primary);
    border-left: 4px solid var(--fd-primary);
    background: linear-gradient(135deg, rgba(0, 50, 77, 0.04) 0%, #fff 100%);
    transform: translateX(0);
}

.fd-list-card:active {
    transform: translateY(-2px) translateX(2px);
    transition-duration: 0.1s;
}

.fd-list-card-thumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--fd-light) 0%, #e9ecef 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fd-list-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 50, 77, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fd-list-card:hover .fd-list-card-thumb {
    box-shadow: inset 0 0 0 1px rgba(0, 50, 77, 0.2), 0 4px 12px rgba(0, 50, 77, 0.15);
    transform: scale(1.05);
}

.fd-list-card:hover .fd-list-card-thumb::after {
    opacity: 1;
}

.fd-list-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fd-list-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fd-text-muted);
    font-size: 28px;
    opacity: 0.6;
    background: linear-gradient(135deg, var(--fd-light) 0%, #e9ecef 100%);
}

.fd-list-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fd-list-card-title {
    font-size: var(--fd-card-title-size, 16px) !important;
    font-weight: 700;
    color: var(--fd-text);
    margin: 0 0 6px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

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

.fd-list-card-address {
    font-size: var(--fd-card-address-size, 13px) !important;
    color: var(--fd-text-muted);
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
}

.fd-list-card-address .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--fd-info);
    opacity: 0.8;
}

.fd-list-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: var(--fd-card-meta-size, 12px) !important;
}

.fd-list-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: var(--fd-card-status-size, 12px) !important;
    font-weight: 500;
    border-radius: 8px;
    color: var(--fd-text-muted);
    text-transform: none;
    letter-spacing: 0;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.fd-list-card-status::before {
    content: '●';
    font-size: 7px;
    opacity: 0.5;
}

/* Status color variants for cards */
.fd-list-card-status.fd-status-functional {
    color: var(--fd-text-muted);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.04);
}

.fd-list-card-status.fd-status-out_of_order {
    color: var(--fd-text-muted);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.04);
}

.fd-list-card-status.fd-status-seasonal {
    color: var(--fd-text-muted);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.04);
}

.fd-list-card-status.fd-status-unknown {
    color: var(--fd-text-muted);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.04);
}

.fd-list-card-type {
    font-size: var(--fd-card-type-size, 12px) !important;
    color: var(--fd-text-muted);
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.fd-list-card:hover .fd-list-card-type {
    background: rgba(0, 50, 77, 0.08);
    color: var(--fd-primary);
}

.fd-list-card-no-map {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--fd-warning);
    font-size: var(--fd-card-secondary-size, 11px) !important;
    padding: 3px 8px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    font-weight: 500;
}

.fd-list-card-no-map .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.fd-list-card.fd-no-coords {
    opacity: 0.85;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 193, 7, 0.03) 100%);
}

.fd-list-card.fd-no-coords:hover {
    opacity: 1;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 193, 7, 0.08) 100%);
}

/* Accessibility indicator */
.fd-list-card-accessibility {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: var(--fd-card-secondary-size, 11px) !important;
    font-weight: 600;
    color: var(--fd-info);
    background: rgba(23, 162, 184, 0.1);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fd-list-card-accessibility .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

/* Map Column */
.fd-directory-map {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    width: 100%;
}

.fd-list-toggle-floating {
    position: absolute;
    top: 16px;
    left: calc(var(--fd-list-left) + var(--fd-list-width) + var(--fd-list-gap));
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--fd-toggle-size);
    width: var(--fd-toggle-size);
    padding: 0;
    border-radius: calc(var(--fd-radius) + 4px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    color: var(--fd-text);
    cursor: pointer;
    transition: left 0.25s ease;
}

.fd-list-toggle-floating:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.fd-sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--fd-text);
    transition: none;
    border-radius: 6px;
}

.fd-sidebar-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.fd-list-toggle-floating:hover .fd-sidebar-icon {
    background: rgba(0, 0, 0, 0.08);
}

.fd-list-toggle-floating.is-collapsed .fd-sidebar-icon {
    transform: rotate(180deg);
}

.fd-directory-container.fd-list-collapsed {
    --fd-list-width: 0px;
    --fd-list-gap: 0px;
}

.fd-directory-map .fd-map-instance {
    flex: 1;
    width: 100%;
}

.fd-directory-map .fd-map-legend {
    position: absolute;
    bottom: 16px;
    left: calc(var(--fd-list-left) + var(--fd-list-width) + var(--fd-list-gap));
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow);
    z-index: 1000;
    margin: 0;
    display: flex;
    gap: 15px;
    transition: left 0.25s ease;
}

.fd-directory-container.fd-list-collapsed .fd-directory-map .fd-map-legend {
    left: 16px;
}

/* Custom Map Markers */
.fd-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fd-primary);
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 50, 77, 0.4), 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fd-marker::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--fd-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fd-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 50, 77, 0.5), 0 4px 8px rgba(0, 0, 0, 0.2);
}

.fd-marker:hover::after {
    opacity: 1;
}

.fd-marker.active {
    transform: scale(1.4);
    z-index: 1000;
    box-shadow: 0 8px 28px rgba(0, 50, 77, 0.6), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.fd-marker.active::after {
    opacity: 1;
}

.leaflet-marker-icon.fd-marker {
    z-index: 1;
}

.leaflet-marker-icon.fd-marker.active {
    z-index: 1000;
}

.fd-marker-functional {
    background: var(--fd-success);
}

.fd-marker-functional::after {
    border-top-color: var(--fd-success);
}

.fd-marker-out_of_order {
    background: var(--fd-danger);
}

.fd-marker-out_of_order::after {
    border-top-color: var(--fd-danger);
}


.fd-marker-seasonal {
    background: var(--fd-warning);
}

.fd-marker-seasonal::after {
    border-top-color: var(--fd-warning);
}

.fd-marker-unknown {
    background: var(--fd-secondary);
}

.fd-marker-unknown::after {
    border-top-color: var(--fd-secondary);
}

.fd-marker-inner {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Accessibility marker variant */
.fd-marker-accessible {
    position: relative;
}

.fd-marker-accessible::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--fd-info);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.5);
}

/* Mobile Header - Hidden on desktop */
.fd-mobile-header {
    display: none;
}

/* Mobile filter panel - Hidden on desktop */
.fd-mobile-filters-panel {
    display: none;
}

/* Filters Overlay - Hidden on desktop */
.fd-filters-overlay {
    display: none;
}

/* Apply button - Hidden on desktop */
.fd-filter-apply {
    display: none;
}

/* ==========================================================================
   Directory Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .fd-directory-list {
        width: 340px;
        min-width: 300px;
    }
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .fd-directory-container {
        flex-direction: column;
        height: calc(100vh - var(--fd-header-height));
        position: relative;
        overflow: hidden;
    }

    /* Hide desktop floating filters on mobile */
    .fd-filters-bar {
        display: none;
    }

    .fd-list-toggle-floating {
        display: none;
    }

    /* Mobile Header */
    .fd-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        background: var(--fd-light);
        border-bottom: 1px solid var(--fd-border);
        flex-shrink: 0;
        z-index: 100;
    }

    .fd-mobile-filters-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        font-size: 14px;
        font-weight: 500;
        color: var(--fd-text);
        background: #fff;
        border: 1px solid var(--fd-border);
        border-radius: var(--fd-radius);
        cursor: pointer;
        transition: all var(--fd-transition);
    }

    .fd-mobile-filters-toggle:hover {
        border-color: var(--fd-primary);
    }

    .fd-mobile-filters-toggle .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .fd-active-filters-count {
        display: none;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        font-size: 11px;
        font-weight: 600;
        line-height: 20px;
        text-align: center;
        color: #fff;
        background: var(--fd-primary);
        border-radius: 10px;
    }

    .fd-active-filters-count.visible {
        display: inline-block;
    }

    /* View Toggle Buttons */
    .fd-mobile-view-toggle {
        display: flex;
        background: #fff;
        border: 1px solid var(--fd-border);
        border-radius: var(--fd-radius);
        overflow: hidden;
    }

    .fd-view-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 500;
        color: var(--fd-text-muted);
        background: transparent;
        border: none;
        cursor: pointer;
        transition: all var(--fd-transition);
    }

    .fd-view-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    .fd-view-btn.active {
        color: #fff;
        background: var(--fd-primary);
    }

    .fd-view-btn:not(.active):hover {
        background: var(--fd-light);
    }

    /* Filters Overlay */
    .fd-filters-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .fd-filters-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Filters Slide-in Panel */
    .fd-mobile-filters-panel {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        border-right: 1px solid var(--fd-border);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        flex-direction: column;
    }

    .fd-mobile-filters-panel.open {
        transform: translateX(0);
    }

    .fd-filters-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        border-bottom: 1px solid var(--fd-border);
        flex-shrink: 0;
    }

    .fd-filters-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

    .fd-filters-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        color: var(--fd-text-muted);
        background: transparent;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: all var(--fd-transition);
    }

    .fd-filters-close:hover {
        background: var(--fd-light);
        color: var(--fd-text);
    }

    .fd-filters-close .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }

    .fd-mobile-filters-body {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
    }

    .fd-mobile-filters-footer {
        display: flex;
        gap: 10px;
        padding: 20px;
        border-top: 1px solid var(--fd-border);
        background: var(--fd-light);
    }

    .fd-mobile-filters-footer .fd-filter-reset {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        font-size: 13px;
        color: var(--fd-text-muted);
        background: transparent;
        border: 1px solid var(--fd-border);
        border-radius: var(--fd-radius);
        cursor: pointer;
        flex: 1;
        justify-content: center;
    }

    .fd-filter-apply {
        display: flex;
        flex: 1;
        justify-content: center;
    }

    /* Main Content Area */
    .fd-directory-list,
    .fd-directory-map {
        position: absolute;
        top: 53px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100% - 53px);
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .fd-directory-list {
        border-right: none;
        z-index: 2;
    }

    .fd-directory-map {
        z-index: 1;
    }

    /* View switching */
    .fd-directory-container.view-map .fd-directory-list {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .fd-directory-container.view-list .fd-directory-map {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .fd-directory-container.view-list .fd-directory-list {
        z-index: 2;
    }

    .fd-list-items {
        display: block;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 15px;
    }

    .fd-list-card {
        width: 100%;
        margin-bottom: 12px;
    }

    .fd-list-card:last-child {
        margin-bottom: 0;
    }

    .fd-directory-map .fd-map-legend {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        flex-wrap: wrap;
        gap: 8px 15px;
        justify-content: center;
    }
}

/* Mobile Breakpoint */
@media (max-width: 600px) {
    .fd-directory-container {
        --fd-header-height: 60px;
    }

    .fd-mobile-header {
        padding: 12px 16px;
    }

    .fd-mobile-filters-toggle {
        min-height: var(--fd-touch-target);
        padding: 8px 16px;
        font-size: 14px;
    }

    .fd-mobile-filters-toggle span:not(.dashicons):not(.fd-active-filters-count) {
        display: none;
    }

    .fd-view-btn {
        min-height: var(--fd-touch-target);
        padding: 8px 16px;
        font-size: 14px;
    }

    .fd-view-btn span:not(.dashicons) {
        display: none;
    }

    .fd-directory-list,
    .fd-directory-map {
        top: 45px;
        height: calc(100% - 45px);
    }

    .fd-mobile-filters-panel {
        width: 100%;
        max-width: 100%;
    }

    .fd-list-items {
        padding: 16px;
    }

    .fd-list-card {
        padding: 16px;
        gap: 16px;
        min-height: var(--fd-touch-target);
        border-radius: 10px;
    }

    .fd-list-card:hover {
        transform: translateY(-2px) translateX(2px);
    }

    .fd-list-card-thumb {
        width: 60px;
        height: 60px;
        border-radius: 8px;
    }

    .fd-list-card:hover .fd-list-card-thumb {
        transform: scale(1.03);
    }

    .fd-list-card-title {
        font-size: 15px;
    }

    .fd-list-card-address {
        font-size: 12px;
    }

    .fd-list-header {
        padding: 12px 15px;
    }

    .fd-directory-map .fd-map-legend {
        font-size: 12px;
        padding: 12px 16px;
        gap: 8px 16px;
    }

    .fd-legend-marker {
        width: 16px;
        height: 16px;
    }

    /* Ensure touch targets on mobile */
    .fd-filters-close,
    .fd-filter-apply,
    .fd-filter-reset-mobile {
        min-height: var(--fd-touch-target);
    }

    /* Mobile popup optimizations - responsive sizing only */
    /* Note: Don't override Leaflet's positioning, let recenterOpenPopup handle visibility */
    .leaflet-popup {
        max-width: calc(100vw - 40px) !important;
    }

    .fd-map-popup {
        min-width: 200px;
        max-width: min(280px, calc(100vw - 40px));
    }

    .leaflet-popup.fd-map-popup .leaflet-popup-content {
        margin: 10px 15px;
    }

    .leaflet-popup.fd-map-popup .leaflet-popup-content-wrapper {
        max-width: 100%;
    }

    .fd-popup-thumbnail {
        margin: -10px -15px 12px;
        width: calc(100% + 30px);
        height: 120px;
        border-radius: 6px 6px 0 0;
    }

    .fd-popup-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .fd-popup-address {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .fd-popup-meta {
        gap: 6px;
        flex-wrap: wrap;
    }

    .fd-popup-type-tag,
    .fd-popup-status-tag {
        font-size: 11px;
        padding: 4px 10px;
    }

    .fd-popup-accessibility {
        font-size: 11px;
        padding: 4px 10px;
    }

    .fd-popup-link {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Adjust popup position to avoid edges */
    .leaflet-popup-tip-container {
        margin-top: -1px;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .fd-list-card {
        flex-direction: column;
    }

    .fd-list-card-thumb {
        width: 100%;
        height: 120px;
    }
}

/* ==========================================================================
   Single Fountain Page
   ========================================================================== */

.fd-single-fountain {
    background: var(--fd-light);
    min-height: 100vh;
}

.fd-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    font-family: var(--fd-font-family);
}

/* Header */
.fd-single-header {
    padding: 40px 0 30px;
}

.fd-single-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.fd-single-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fd-type-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    background: var(--fd-primary);
    color: #fff;
    border-radius: 20px;
}

.fd-single-title {
    margin: 0 0 15px;
    font-family: var(--fd-font-family);
    font-size: 32px;
    font-weight: var(--fd-font-weight-titles);
    color: var(--fd-text);
    line-height: 1.2;
}

.fd-single-address,
.fd-single-region {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: var(--fd-font-size-base);
    color: var(--fd-text-muted);
}

.fd-single-address .dashicons,
.fd-single-region .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--fd-primary);
}

/* Content Layout */
.fd-single-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

/* Main Content */
.fd-single-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Gallery */
.fd-single-gallery {
    background: #fff;
    border-radius: var(--fd-radius);
    padding: 20px;
    box-shadow: var(--fd-shadow);
}

.fd-gallery-main {
    margin-bottom: 15px;
}

.fd-gallery-main img {
    width: 100%;
    height: auto;
    border-radius: var(--fd-radius);
}

.fd-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fd-gallery-thumb {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: calc(var(--fd-radius) - 2px);
    overflow: hidden;
    transition: transform var(--fd-transition);
}

.fd-gallery-thumb:hover {
    transform: scale(1.05);
}

.fd-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fd-photo-credit {
    margin: 15px 0 0;
    font-size: 13px;
    color: var(--fd-text-muted);
    font-style: italic;
}

/* Description */
.fd-single-description {
    background: #fff;
    border-radius: var(--fd-radius);
    padding: 25px;
    box-shadow: var(--fd-shadow);
}

.fd-single-description h2 {
    margin: 0 0 15px;
    font-family: var(--fd-font-family);
    font-size: 20px;
    font-weight: var(--fd-font-weight-titles);
    color: var(--fd-text);
}

.fd-description-content {
    font-family: var(--fd-font-family);
    font-size: var(--fd-font-size-base);
    line-height: 1.7;
    color: var(--fd-text);
}

.fd-description-content p {
    margin: 0 0 15px;
}

.fd-description-content p:last-child {
    margin-bottom: 0;
}

/* Sections (Monument, Bibliography) */
.fd-single-section {
    background: #fff;
    border-radius: var(--fd-radius);
    padding: 25px;
    box-shadow: var(--fd-shadow);
}

.fd-single-section h2 {
    margin: 0 0 15px;
    font-family: var(--fd-font-family);
    font-size: var(--fd-font-size-lg);
    font-weight: var(--fd-font-weight-titles);
    color: var(--fd-text);
}

.fd-section-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--fd-text);
}

.fd-section-content a {
    color: var(--fd-primary);
    word-break: break-word;
}

.fd-section-content ul {
    margin: 0;
    padding-left: 20px;
}

.fd-section-content li {
    margin-bottom: 8px;
}

/* Sidebar */
.fd-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Info Card */
.fd-info-card {
    background: #fff;
    border-radius: var(--fd-radius);
    padding: 20px;
    box-shadow: var(--fd-shadow);
}

.fd-info-card h3 {
    margin: 0 0 15px;
    font-family: var(--fd-font-family);
    font-size: var(--fd-font-size-base);
    font-weight: var(--fd-font-weight-titles);
    color: var(--fd-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fd-info-list {
    margin: 0;
}

.fd-info-item {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid var(--fd-border);
}

.fd-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fd-info-item:first-child {
    padding-top: 0;
}

.fd-info-item dt {
    font-size: 12px;
    font-weight: 600;
    color: var(--fd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fd-info-item dd {
    margin: 0;
    font-size: 15px;
    color: var(--fd-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fd-info-item dd .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--fd-info);
}

.fd-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.fd-status-indicator.fd-status-functional {
    background: var(--fd-success);
}

.fd-status-indicator.fd-status-out_of_order {
    background: var(--fd-danger);
}

.fd-status-indicator.fd-status-seasonal {
    background: var(--fd-warning);
}

.fd-status-indicator.fd-status-unknown {
    background: var(--fd-secondary);
}

/* Map Card */
.fd-single-map-card {
    background: #fff;
    border-radius: var(--fd-radius);
    padding: 20px;
    box-shadow: var(--fd-shadow);
}

.fd-single-map-card h3 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--fd-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fd-single-map {
    height: 250px;
    border-radius: var(--fd-radius);
    margin-bottom: 15px;
}

.fd-map-actions {
    display: flex;
    gap: 10px;
}

.fd-map-actions .fd-button {
    flex: 1;
    justify-content: center;
}

/* Tags Card */
.fd-tags-card,
.fd-contributor-card {
    background: #fff;
    border-radius: var(--fd-radius);
    padding: 20px;
    box-shadow: var(--fd-shadow);
}

.fd-tags-card h3,
.fd-contributor-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fd-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fd-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    background: var(--fd-light);
    color: var(--fd-text);
    border-radius: 4px;
}

.fd-contributor-card p {
    margin: 0;
    font-size: 15px;
    color: var(--fd-text);
}

/* Navigation */
.fd-single-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--fd-border);
}

.fd-nav-prev,
.fd-nav-next {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    font-size: 14px;
    color: var(--fd-text);
    text-decoration: none;
    background: #fff;
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow);
    transition: all var(--fd-transition);
    max-width: 200px;
}

.fd-nav-prev:hover,
.fd-nav-next:hover {
    box-shadow: var(--fd-shadow-lg);
    color: var(--fd-primary);
}

.fd-nav-prev span:not(.dashicons),
.fd-nav-next span:not(.dashicons) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fd-nav-back {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fd-primary);
    text-decoration: none;
}

.fd-nav-back:hover {
    text-decoration: underline;
}

/* Single Page Responsive */
@media (max-width: 900px) {
    .fd-single-content {
        grid-template-columns: 1fr;
    }

    .fd-single-sidebar {
        order: -1;
    }

    .fd-info-card {
        order: 1;
    }

    .fd-single-map-card {
        order: 2;
    }

    .fd-single-title {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .fd-single-header {
        padding: 20px 0;
    }

    .fd-single-title {
        font-size: 22px;
    }

    .fd-single-description,
    .fd-single-section,
    .fd-single-gallery,
    .fd-info-card,
    .fd-single-map-card,
    .fd-tags-card,
    .fd-contributor-card {
        padding: 15px;
    }

    .fd-gallery-thumb {
        width: 60px;
        height: 60px;
    }

    .fd-single-nav {
        flex-direction: column;
        gap: 15px;
    }

    .fd-nav-prev,
    .fd-nav-next {
        max-width: 100%;
        width: 100%;
        justify-content: center;
    }

    .fd-nav-back {
        order: -1;
    }
}

/* ==========================================================================
   Filtre Région — select stylisé comme les pills Type/Statut
   ========================================================================== */

.fd-filter-region-wrap {
    display: flex;
    align-items: center;
}

.fd-filter-select {
    display: inline-flex;
    align-items: center;
    min-height: var(--fd-touch-target, 44px);
    padding: 8px 36px 8px 14px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--fd-text, #1a1a1a);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid var(--fd-border, #dee2e6);
    border-radius: calc(var(--fd-radius, 8px) - 2px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
}

.fd-filter-select:hover {
    border-color: var(--fd-primary, #00324d);
    background-color: rgba(0, 50, 77, 0.02);
    transform: translateY(-1px);
}

.fd-filter-select:focus {
    outline: 2px solid rgba(0, 50, 77, 0.2);
    outline-offset: 2px;
    border-color: var(--fd-primary, #00324d);
}

.fd-filter-select.active {
    border-color: var(--fd-primary, #00324d);
    background-color: var(--fd-primary, #00324d);
    color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E");
    box-shadow: 0 4px 12px rgba(0, 50, 77, 0.25);
}

/* ==========================================================================
   Date de dernière mise à jour — single fountain
   ========================================================================== */

.fd-last-modified {
    font-size: 13px;
    color: var(--fd-text-muted, #6c757d);
    text-align: right;
    padding: 10px 0 4px;
    margin-top: 4px;
    border-top: 1px solid var(--fd-border, #dee2e6);
}

/* ==========================================================================
   Multi-step form — step indicators & layout
   ========================================================================== */

.fd-multistep-form {
    max-width: 700px;
}

/* Step content must span full grid width of the Breakdance form */
.fd-step-content {
    grid-column: 1 / -1;
    width: 100%;
}

/* Spacing between form fields inside steps */
.fd-step-content .breakdance-form-field {
    margin-bottom: 18px;
}

.fd-step-content .breakdance-form-field__label {
    display: block;
    margin-bottom: 6px;
}

/* Step indicator row */
.fd-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--fd-border, #dee2e6);
}

.fd-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    opacity: 0.45;
    transition: opacity 0.25s ease;
}

.fd-step--active,
.fd-step--done {
    opacity: 1;
}

.fd-step__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--fd-border, #dee2e6);
    color: var(--fd-text-muted, #6c757d);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease;
}

.fd-step--active .fd-step__number {
    background: var(--fd-primary, #00324d);
    color: #fff;
}

.fd-step--done .fd-step__number {
    background: var(--fd-success, #198754);
    color: #fff;
}

.fd-step__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--fd-text, #1a1a1a);
}

.fd-step-divider {
    flex: 0 0 40px;
    height: 2px;
    background: var(--fd-border, #dee2e6);
    margin: 0 8px;
}

/* Step intro text */
.fd-step-intro {
    font-size: 14px;
    color: var(--fd-text-muted, #6c757d);
    margin-bottom: 24px;
    padding: 12px 16px;
    background: rgba(0, 50, 77, 0.04);
    border-radius: var(--fd-radius, 8px);
    border-left: 3px solid var(--fd-primary, #00324d);
}

/* Step 2 footer: previous + submit side by side */
.fd-step2-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fd-step2-footer .button-atom {
    flex: 0 0 auto;
    width: auto !important;
}

/* Captcha input — smaller width */
.fd-captcha-input {
    max-width: 100px !important;
}
