/* Google Maps Component CSS - Integrated from GoogleMapComponent.razor.css */

/* Force light mode - override browser dark mode */
.checkbox-text {
    color: #1f2937 !important;
}

/*
    START
    Container principale della mappa
*/
.map-container {
    position: relative;
    width: 100%;
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Mappa Google Maps */
.google-map {
    width: 100%;
    height: 100%;
}

/* Panel informazioni in tempo reale */
.map-info-panel {
    position: absolute;
    top: 13px;
    right: 56px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    font-size: 12px;
    min-width: 100px;
    z-index: 1000;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    align-items: center;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item .label {
    font-weight: 600;
    color: #374151;
    margin-right: 12px;
}

.info-item .value {
    font-weight: 700;
    color: #1f2937;
    font-family: 'Courier New', monospace;
}

/* Indicatore di caricamento */
.loading-indicator {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.loading-indicator span {
    color: #6b7280;
    font-size: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Overlay e popup per dettagli POI */
.poi-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.poi-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    min-width: 500px;
    max-width: 1000px;
    max-height: 80vh;
    width: 90%;
    overflow: visible;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header del popup */
.poi-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0500D5 0%, #3366ff 100%);
    color: white;
}

.poi-popup-header .header-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poi-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.poi-popup-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Contenuto del popup */
.poi-popup-content {
    padding: 15px;
    overflow: visible;
    padding-top: 70px;
}

/* Layout a due colonne per dettagli POI */
.poi-two-column-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .poi-two-column-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Griglia informazioni principali */
.poi-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 12px;
}

.poi-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poi-info-item.full-width {
    grid-column: 1 / -1;
    padding-bottom: 10px;
}

.poi-info-item strong {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.poi-info-item span,
.poi-info-item p {
    color: #161616;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Stili per tipi di procedura */
.procedure-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.procedure-seizure {
    background: #fee2e2;
    color: #dc2626;
}

.procedure-auction {
    background: #dbeafe;
    color: #2563eb;
}

.procedure-assestment{
background: #dbeafe;
color: #2563eb;
}

.procedure-paymentOrder {
    background: #e7d4fa;
    color: #a244ff;
}

.procedure-unknown {
    background: #f3f4f6;
    color: #6b7280;
}

/* Proprietà aggiuntive */
.additional-properties,
.external-data {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.additional-properties h4,
.external-data h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.properties-grid,
.external-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.property-item,
.external-data-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #e5e7eb;
}

.property-item strong,
.external-data-item strong {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    margin-bottom: 4px;
}

.property-item span,
.external-data-item span {
    color: #6b7280;
    font-size: 13px;
    word-break: break-word;
}

/* Responsività per mobile */
@media (max-width: 768px) {
    .map-container {
        height: 400px;
        border-radius: 0;
    }

    .map-info-panel {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 10px 12px;
        font-size: 12px;
        min-width: auto;
    }

    .poi-popup {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }

    .poi-popup-header {
        padding: 16px 20px;
    }

    .poi-popup-header h3 {
        font-size: 18px;
    }

    .poi-popup-content {
        padding: 20px;
    }

    .poi-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .properties-grid,
    .external-data-grid {
        grid-template-columns: 1fr;
    }
}


/* Custom Aggregate Map Markers */
.aggregate-marker {
    position: relative;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 6px;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aggregate-marker::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #333;
}

.aggregate-marker-content {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.marker-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 40px;
}

.marker-section-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
}

.marker-section-count {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

/* Icone SVG per i diversi tipi */
.seizure-icon {
    fill: #ffd700;
}

.auction-icon {
    fill: #ff4444;
}

.payment-order-icon {
    fill: #44aa44;
}

/* Nasconde le sezioni con count = 0 */
.marker-section.hidden {
    display: none;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/*
    END
    Container principale della mappa
*/


/*
    START
    Stili per il componente filtri POI
    Design moderno e responsivo con animazioni fluide
*/

/* Container principale */
.poi-filter-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Header del pannello filtri */
.filter-header {
    background: linear-gradient(135deg, #0500D5 0%, #3366ff 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-icon {
    font-size: 20px;
}

.btn-reset {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-reset:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.btn-reset:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reset-icon {
    font-size: 16px;
}

/* Contenuto filtri */
.filter-content {
    padding: 20px;
}

/* Sezioni filtri */
.filter-section {
    margin-bottom: 24px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

/* Etichette filtri */
.filter-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label-text,
.label-text {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    display: block;
}

/* Input di base */
.form-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Input di ricerca con pulsante clear */
.search-input-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding-right: 36px;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.clear-search-btn:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Gruppo checkbox per tipi procedura */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    background: #fafafa;
}

.checkbox-label:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "✓";
    position: absolute;
    color: black;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

/* Badge per tipi procedura */
.procedure-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.procedure-seizure .procedure-badge {
    background: #fee2e2;
    color: #dc2626;
}

.procedure-auction .procedure-badge {
    background: #dbeafe;
    color: #2563eb;
}

.procedure-assestment .procedure-badge {
    background: #dbeafe;
    color: #2563eb;
}

.procedure-paymentOrder .procedure-badge {
    background: #e7d4fa;
    color: #a244ff;
}

.procedure-unknown .procedure-badge {
    background: #f3f4f6;
    color: #6b7280;
}

/* Filtro geografico */
.geographic-filter {
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.bounds-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.bounds-item {
    font-size: 13px;
    color: #6b7280;
}

.btn-clear-bounds {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-clear-bounds:hover {
    background: #dc2626;
}

.no-geographic-filter {
    text-align: center;
    padding: 16px;
}

.info-text {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 4px;
}

.hint-text {
    color: #9ca3af;
    font-size: 12px;
}

/* Sezioni collassabili */
.collapsible .collapsible-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    width: 100%;
    text-align: left;
}

.expand-icon {
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.2s;
    vertical-align: top;
    line-height: 1;
    margin-top: 2px;
}

.expand-icon.expanded {
    transform: rotate(90deg);
}

.collapsible-content {
    margin-top: 12px;
    padding-left: 20px;
}

/* Filtri temporali */
.date-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.date-input {
    cursor: pointer;
}

/* Testo di aiuto */
.help-text {
    color: #9ca3af;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

/* Statistiche filtri */
.filter-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-item {
    color: #6b7280;
}

.stat-item strong {
    color: #374151;
}

.active-filters-summary {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 12px;
}

.active-filters-summary strong {
    color: #0c4a6e;
    font-size: 12px;
    display: block;
    margin-bottom: 8px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-tag {
    background: #0284c7;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Responsività mobile */
@media (max-width: 768px) {
    .filter-content {
        padding: 16px;
    }

    .filter-section {
        margin-bottom: 20px;
    }

    .date-filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bounds-display {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-tags {
        flex-direction: column;
    }

    .filter-tag {
        align-self: flex-start;
    }
}

/* Animazioni fluide */
.checkbox-label,
.form-input,
.form-select,
.btn-reset,
.btn-clear-bounds,
.clear-search-btn {
    transition: all 0.2s ease-out;
}

/* Focus states migliorati per accessibilità */
.checkbox-label:focus-within,
.collapsible-header:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/*
    END
    Stili per il componente filtri POI
    Design moderno e responsivo con animazioni fluide
*/

/*
    START
    Stili CSS per il popup della procedura selezionata da mappa
*/


/* Container per label e tooltip inline */
.poi-label-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Wrapper per icona tooltip e contenuto */
.tooltip-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
}

/* Icona tooltip */
.tooltip-icon {
    cursor: help;
    font-size: 0.85em;
    color: #6b7280 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tooltip-icon:hover {
    color: #374151 !important;
    background: rgba(107, 114, 128, 0.1);
}

/* Contenuto del tooltip */
.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    max-width: 250px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Freccia del tooltip */
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

/* Mostra il tooltip al hover del gruppo */
.group:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* Stili per il poi-info-item */
.poi-info-item {
    position: relative;
}

/*
    END
Stili CSS per il popup della procedura selezionata da mappa
*/


/*
    START
    Stili CSS per la pagina principale dell'applicazione
    Layout enterprise con header, sidebar, main area e footer
*/

/* Container principale */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Header dell'applicazione */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    flex: 1;
}

.app-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.2;
}

.title-icon {
    font-size: 32px;
}

.app-subtitle {
    margin: 4px 0 0 0;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Selettore livello utente */
.user-level-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-level-label {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.user-level-select {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 140px;
}

.user-level-select:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

/* Layout principale */
.main-layout {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 24px;
    padding-top: 24px;
    padding-right: 1px;
    padding-left: 1px;
    align-items: stretch;
}

/* Sidebar con filtri */
.sidebar {
    width: 350px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 120px;
}

/* Area principale con mappa */
.map-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.map-wrapper {

    min-height: 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Warning per API key mancante */
.api-key-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    background: #fef2f2;
    border: 2px dashed #fca5a5;
    border-radius: 12px;
}

.warning-content {
    max-width: 600px;
    padding: 40px;
    text-align: center;
    color: #991b1b;
}

.warning-content h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #dc2626;
}

.warning-content p {
    margin: 16px 0;
    line-height: 1.6;
    color: #7f1d1d;
}

.config-example {
    background: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-align: left;
    margin: 16px 0;
    overflow-x: auto;
}

.warning-content a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.warning-content a:hover {
    text-decoration: underline;
}

/* Pannello statistiche */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #e5e7eb;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Colori specifici per livelli utente */
.stat-card.user-level-silver {
    border-left-color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.stat-card.user-level-gold {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.stat-card.user-level-platinum {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.stat-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Footer dell'applicazione */
.app-footer {
    background: #374151;
    color: #d1d5db;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
}

.footer-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section strong {
    color: white;
}

/* Indicatore performance */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

.performance-indicator.optimal {
    background: #dcfce7;
    color: #16a34a;
}

.performance-indicator.moderate {
    background: #fef3c7;
    color: #d97706;
}

.performance-indicator.heavy {
    background: #fee2e2;
    color: #dc2626;
}

/* Responsività per tablet */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }

    .sidebar {
        width: 100%;
        position: static;
        order: 2;
    }

    .map-area {
        order: 1;
    }

    .stats-panel {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 20px;
    }
}

/* Responsività per mobile */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-right {
        justify-content: center;
    }

    .app-title {
        font-size: 24px;
        justify-content: center;
    }

    .app-subtitle {
        font-size: 14px;
    }

    .main-layout {
        padding: 16px;
        gap: 16px;
    }

    .map-wrapper {
        min-height: 500px;
    }

    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 16px 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 12px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .footer-section {
        justify-content: center;
    }

    .warning-content {
        padding: 20px;
    }

    .warning-content h3 {
        font-size: 20px;
    }

    .user-level-selector {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Animazioni fluide */
.stat-card,
.performance-indicator,
.user-level-select {
    transition: all 0.2s ease-out;
}

/* Stati hover migliorati */
.user-level-select:hover {
    background: white;
    transform: scale(1.02);
}

/* Loading states */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stat-value:empty::after {
    content: "...";
    animation: pulse 1.5s ease-in-out infinite;
}

/* Focus states per accessibilità */
.user-level-select:focus,
.stat-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/*
    END
    Stili CSS per la pagina principale dell'applicazione
    Layout enterprise con header, sidebar, main area e footer
*/

/*
START
Stili per il componente operazioni POI
*/
.poi-operations-container {
    @apply bg-white rounded-lg shadow-lg p-4 max-w-md;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.poi-operations-header {
    @apply mb-4 pb-2 border-b border-gray-200;
}

.poi-status-indicators {
    @apply flex gap-2 flex-wrap;
}

.status-badge {
    @apply px-3 py-1 rounded-full text-sm font-medium;
}

.favorite-badge {
    @apply bg-red-100 text-red-800 border border-red-200;
}

.purchased-badge {
    @apply bg-green-100 text-green-800 border border-green-200;
}

.poi-operations-actions {
    @apply space-y-4;
}

.operation-section {
    @apply bg-gray-50 rounded-lg p-3;
}

.operation-section h4 {
    @apply text-lg font-semibold text-gray-800 mb-3;
}

/* Pulsanti */
.btn {
    @apply px-4 py-2 rounded-lg font-medium text-sm transition-all duration-200
    flex items-center gap-2 justify-center min-w-0;
}

.btn:disabled {
    @apply opacity-50 cursor-not-allowed;
}

.btn-add-favorite {
    @apply bg-red-500 text-white hover:bg-red-600;
}

.btn-remove-favorite {
    @apply bg-gray-500 text-white hover:bg-gray-600;
}

.btn-purchase {
    @apply bg-blue-500 text-white hover:bg-blue-600 text-xs px-2 py-1;
}

.btn-view-services {
    @apply bg-green-500 text-white hover:bg-green-600 mt-2;
}

.btn-purchase-services {
    background: linear-gradient(to right, #10b981, #059669) !important;
    color: white !important;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3), 0 4px 6px -2px rgba(16, 185, 129, 0.2);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-purchase-services span {
    color: white !important;
    font-size: 1.125rem;
    font-weight: 700;
}

.btn-purchase-services:hover {
    background: linear-gradient(to right, #059669, #047857) !important;
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.4), 0 10px 10px -5px rgba(16, 185, 129, 0.3);
    transform: scale(1.05);
}

.btn-purchase-services:disabled {
    background: #d1d5db !important;
    color: #6b7280 !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-purchase-services:disabled span {
    color: #6b7280 !important;
}

/* Sezione acquisti */
.purchased-info {
    @apply text-center;
}

.purchased-info span {
    @apply block text-gray-600 mb-2;
}

.purchase-options p {
    @apply text-gray-700 mb-3;
}

.service-list {
    @apply space-y-2;
}

.service-item {
    @apply bg-white rounded border border-gray-200 p-3
    flex items-center justify-between;
}

.service-name {
    @apply font-medium text-gray-800;
}

.service-price {
    @apply text-green-600 font-semibold mr-2;
}

.service-state {
    @apply font-small text-gray-800;
}

.service-availability {
    @apply font-small text-gray-800;
}

/* Messaggi di operazione */
.operation-message {
    @apply mt-4 p-3 rounded-lg text-sm font-medium text-center;
}

.operation-message.success {
    @apply bg-green-100 text-green-800 border border-green-200;
}

.operation-message.error {
    @apply bg-red-100 text-red-800 border border-red-200;
}

/* Responsive */
@media (max-width: 640px) {
    .poi-operations-container {
        @apply max-w-full mx-2;
    }

    .service-item {
        @apply flex-col items-start gap-2;
    }

    .btn {
        @apply w-full;
    }
}

/* Animazioni */
.status-badge {
    animation: fadeIn 0.3s ease-in-out;
}

.operation-message {
    animation: slideDown 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stili per l'integrazione nel popup della mappa */
::deep .poi-operations-wrapper {
    @apply mt-6 pt-4 border-t border-gray-200;
}

::deep .poi-operations-wrapper .poi-operations-container {
    @apply shadow-none bg-transparent p-0;
}

::deep .poi-popup-content {
}

/* Ensure proper spacing in the popup */
::deep .poi-info-grid + .poi-operations-wrapper {
    @apply mt-4;
}

/*
END
Stili per il componente operazioni POI
*/