/**
 * Flonar Custom Styles
 */

/* Custom Fonts */
@font-face {
    font-family: 'Glitz';
    src: url('../fonts/glitz.otf') format('opentype'),
         url('../fonts/glitz.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aloevera';
    src: url('../fonts/Aloevera Font/Aloevera-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aloevera';
    src: url('../fonts/Aloevera Font/Aloevera-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aloevera';
    src: url('../fonts/Aloevera Font/Aloevera-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aloevera';
    src: url('../fonts/Aloevera Font/Aloevera-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aloevera';
    src: url('../fonts/Aloevera Font/Aloevera-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Base Typography */
body {
    font-family: 'Aloevera', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

h1, h2, h3 {
    font-family: 'Aloevera', sans-serif;
    font-weight: 600;
}

h4, h5, h6 {
    font-family: 'Aloevera', sans-serif;
    font-weight: 500;
}

/* Logo specific styling */
.logo-text {
    font-family: 'Glitz', cursive;
    letter-spacing: 0.02em;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Map container */
#map {
    background-color: #f1f5f9;  /* Neutral light gray - global professional */
    z-index: 1;
}

/* Ensure modal appears above map */
.leaflet-container {
    z-index: 1;
}

/* Hide Leaflet's bounding box rectangle */
.leaflet-interactive:focus {
    outline: none !important;
}

.leaflet-overlay-pane svg rect {
    display: none !important;
}

/* Modal overlay and content */
[x-data] > div[x-show] {
    z-index: 9999 !important;
}

/* Leaflet tooltips */
.parish-tooltip {
    background-color: rgba(30, 64, 175, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.parish-tooltip::before {
    border-top-color: rgba(30, 64, 175, 0.9);
}

.community-tooltip {
    background-color: rgba(5, 150, 105, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.community-tooltip::before {
    border-top-color: rgba(5, 150, 105, 0.9);
}

/* Report popup */
.report-popup {
    min-width: 200px;
}

/* Custom marker */
.custom-marker {
    background: transparent;
    border: none;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .leaflet-control-zoom {
        margin-right: 10px;
        margin-bottom: 10px;
    }
}

/* Status badges */
.status-active {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-partially-resolved {
    background-color: #fef3c7;
    color: #92400e;
}

.status-fully-resolved {
    background-color: #d1fae5;
    color: #065f46;
}

/* Report type badges */
.type-outage {
    background-color: #dbeafe;
    color: #1e40af;
}

.type-blockage {
    background-color: #fef3c7;
    color: #92400e;
}

.type-damage {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Pulse animation for new reports */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-marker div {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Marker cluster styles */
.marker-cluster-small {
    background-color: rgba(16, 185, 129, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(16, 185, 129, 0.8);
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 50%;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster-medium {
    background-color: rgba(245, 158, 11, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(245, 158, 11, 0.8);
    width: 35px;
    height: 35px;
    margin-left: 2.5px;
    margin-top: 2.5px;
    text-align: center;
    border-radius: 50%;
    font: 14px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster-large {
    background-color: rgba(239, 68, 68, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(239, 68, 68, 0.8);
    width: 35px;
    height: 35px;
    margin-left: 2.5px;
    margin-top: 2.5px;
    text-align: center;
    border-radius: 50%;
    font: 14px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
}

/* Relief point cluster styles */
.marker-cluster-relief {
    background-color: rgba(147, 51, 234, 0.6);
}

.marker-cluster-relief div {
    background-color: rgba(147, 51, 234, 0.9);
    width: 35px;
    height: 35px;
    margin-left: 2.5px;
    margin-top: 2.5px;
    text-align: center;
    border-radius: 50%;
    font: 14px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Social Media Embeds */
.twitter-embed-container {
    min-height: 200px;
    width: 100%;
}

.twitter-embed-container iframe {
    width: 100% !important;
    max-width: 550px;
}

.instagram-embed-container {
    min-height: 400px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.youtube-embed-container {
    width: 100%;
}

.facebook-embed-container {
    min-height: 300px;
    width: 100%;
}

.tiktok-embed-container {
    min-height: 500px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Iframely embed overrides - remove fixed aspect ratio */
.iframely-override .iframely-responsive {
    padding-bottom: 0 !important;
    position: relative !important;
    height: auto !important;
    min-height: 500px !important;
}

.iframely-override .iframely-responsive iframe {
    position: relative !important;
    height: 500px !important;
    width: 100% !important;
}

/* Feed mini map responsive heights */
.feed-mini-map {
    height: 300px;
    width: 300px;
}

@media (min-width: 768px) {
    .feed-mini-map {
        height: 700px;
        width: 100%;
    }
}

/* Hide broken image alt text */
img[alt*="Report photo"] {
    color: transparent;
    font-size: 0;
}

/* Style for when image fails to load - hide the broken icon */
img[alt*="Report photo"][src*="data:image/svg"] {
    opacity: 0.6;
}
