/**
 * SITVI - Patrimonio Panel CSS
 *
 * Stili del pannello patrimonio nel WebGIS viewer (IIFE SitviPatrimonio):
 * container glassmorphic, combo ricerca fascicolo/categoria, azioni.
 * Pattern coerente con catasto-panel.css / toponomastica-panel.css.
 *
 * @package SITVI
 * @version 1.0.0
 */

.sitvi-patr-panel {
    position: absolute;
    top: 56px;
    right: 12px;
    width: 320px;
    max-height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        0 1px 4px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    z-index: 95;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.sitvi-patr-panel.open {
    opacity: 1;
    transform: translateX(0);
}

.sitvi-patr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.sitvi-patr-header:active {
    cursor: grabbing;
}

.sitvi-patr-title {
    font-weight: 600;
    color: #0369a1;
}
.sitvi-patr-title i { margin-right: 6px; }

.sitvi-patr-close {
    background: transparent;
    border: 0;
    color: #475569;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sitvi-patr-close:hover { background: rgba(0, 0, 0, 0.06); }

.sitvi-patr-body {
    padding: 12px 14px;
    overflow-y: auto;
}

.sitvi-patr-section {
    margin-bottom: 4px;
}

.sitvi-patr-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

/* Autocomplete suggestions */
.sitvi-patr-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin-top: 2px;
}

.sitvi-patr-sugg-item {
    padding: 7px 10px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.3;
}
.sitvi-patr-sugg-item:last-child { border-bottom: none; }
.sitvi-patr-sugg-item:hover,
.sitvi-patr-sugg-item.highlighted { background: #f0f9ff; }

.sitvi-patr-sugg-code {
    display: inline-block;
    min-width: 56px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: #0369a1;
    font-weight: 600;
    margin-right: 6px;
}

.sitvi-patr-empty {
    padding: 8px 10px;
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}

/* Status footer */
.sitvi-patr-status {
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
    font-size: 11px;
    min-height: 14px;
}
.sitvi-patr-status.text-danger { color: #b91c1c !important; }

@media (max-width: 768px) {
    .sitvi-patr-panel {
        right: 8px;
        left: 8px;
        width: auto;
        top: 56px;
    }
}
