:root {
    --primary: #3A56A0;
    --accent: #F26B5B;
    --bg: #F4F7FB;
    --white: #ffffff;
    --text: #333333;
    --gray: #888888;
}

/* RESET BASE */
.sicseg-app-wrapper {
    font-family: 'Roboto', 'Helvetica', sans-serif;
    background: var(--bg);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
}
.sicseg-app-wrapper * { box-sizing: border-box; }

/* VIEW SECTIONS */
.view-intro { padding: 15px 15px 5px 15px; }
.view-intro h3 { margin: 0; color: var(--primary); font-family: 'Oswald', sans-serif; font-size: 22px; }
.view-intro p { margin: 5px 0 0 0; font-size: 14px; color: #666; }

/* CONTROLS (Filtri) */
.sicseg-controls {
    background: var(--white);
    padding: 10px 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 900;
}

/* SEARCH BAR MIGLIORATA */
.search-wrapper {
    position: relative;
    margin-bottom: 12px;
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}
.sicseg-search-bar {
    width: 100%;
    padding: 12px 12px 12px 35px; /* Spazio per la lente */
    border: 1px solid #ddd;
    border-radius: 50px; /* Molto arrotondato */
    font-size: 15px;
    background: #f9f9f9;
    outline: none;
    transition: all 0.2s;
}
.sicseg-search-bar:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58, 86, 160, 0.1);
}

/* FILTRI SELECT STILIZZATI */
.filters-row {
    display: flex;
    gap: 10px;
}
.select-wrapper {
    flex: 1;
    position: relative;
}

/* Design "Bottone" per le select */
.sicseg-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none; /* Rimuove stile default Safari/Chrome */
    -moz-appearance: none;

    background-color: white;
    border: 2px solid var(--primary); /* Bordo Blu evidente */
    border-radius: 50px; /* Forma a pillola */
    color: var(--primary); /* Testo Blu */

    font-size: 13px;
    font-weight: 700; /* Grassetto */
    padding: 10px 30px 10px 15px; /* Spazio a destra per la freccia */

    cursor: pointer;
    outline: none;
    transition: all 0.2s;

    /* Freccia personalizzata in SVG (blu) */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%233A56A0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
}

.sicseg-select:focus {
    box-shadow: 0 0 0 3px rgba(58, 86, 160, 0.2);
}

/* LISTA E CARDS */
.sicseg-list { padding: 15px; }
.session-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);

    /* COLORE DINAMICO */
    border-left: 5px solid var(--room-color);
    background: linear-gradient(to right, color-mix(in srgb, var(--room-color), white 93%), white 30%);
}
.card-left { text-align: center; color: var(--room-color); display: flex; flex-direction: column; justify-content: center; }
.time-start { font-size: 18px; font-weight: 700; line-height: 1; }
.time-end { font-size: 12px; color: var(--gray); margin-top: 4px; }

.card-meta { font-size: 11px; text-transform: uppercase; color: var(--gray); margin-bottom: 6px; }
.badge-sala { font-weight: bold; }
.badge-tipo { color: var(--accent); }
.meta-date-row { font-size: 10px; color: #999; margin-top: 2px; }
.card-title { font-family: 'Oswald', sans-serif; font-size: 16px; margin: 0 0 5px 0; color: var(--text); line-height: 1.3; }
.card-speakers { font-size: 13px; color: #555; font-style: italic; margin: 0; }

/* CUORE */
.btn-fav { background: transparent !important; border: none !important; padding: 0 !important; font-size: 28px; cursor: pointer; color: #ccc; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.btn-fav.saved { color: var(--accent); }
.btn-fav:hover { transform: scale(1.2); color: var(--accent); }

/* BOTTOM NAV */
.sicseg-bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: white; border-top: 1px solid #ddd; display: flex; justify-content: space-around; align-items: center; z-index: 2147483647 !important; padding-bottom: env(safe-area-inset-bottom, 15px); padding-top: 8px; height: auto; box-shadow: 0 -4px 15px rgba(0,0,0,0.08); }
@media (min-width: 900px) { .sicseg-bottom-nav { max-width: 900px; left: 50%; transform: translateX(-50%); border-left: 1px solid #ddd; border-right: 1px solid #ddd; padding-bottom: 8px; } }
.nav-item { background: transparent !important; border: none !important; padding: 5px 0 !important; margin: 0 !important; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: #aaa; -webkit-tap-highlight-color: transparent; }
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 24px; line-height: 1; margin-bottom: 3px; display: block; }
.nav-label { font-size: 10px; font-weight: 600; line-height: 1; display: block; }

/* INFO & MAPPE */
.info-card { background: white; padding: 15px; border-radius: 8px; margin-bottom: 10px; border-left: 4px solid var(--accent); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.info-card h4 { margin: 0 0 5px 0; color: var(--primary); }
.info-card p { margin: 0; color: #555; font-size: 14px; }
.empty-msg, .loader { text-align: center; padding: 30px; color: #999; font-style: italic; }

.map-card { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,0.08); margin-bottom: 15px; border: 1px solid #eee; }
.map-header { background: var(--primary); padding: 12px 15px; color: white; border-bottom: 1px solid rgba(0,0,0,0.1); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.map-header:hover { background: #2e4585; }
.map-header h4 { margin: 0; color: white !important; font-family: 'Oswald', sans-serif; font-size: 16px; text-transform: uppercase; }
.map-arrow { font-size: 12px; transition: transform 0.3s ease; }
.map-card.open .map-arrow { transform: rotate(180deg); }
.map-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: white; }
.map-inner { padding: 15px; }
.map-image-container { background: #f9f9f9; border: 1px solid #eee; padding: 5px; border-radius: 4px; margin-bottom: 15px; }
.map-body img { width: 100%; height: auto; display: block; border-radius: 2px; }
.map-desc { font-size: 14px; color: #555; line-height: 1.5; }
