/**
 * CSS per raggruppare gli stand per sede
 */

/* Navigazione delle venue rimossa - utilizziamo i filtri esistenti */

/* Stile generale per i gruppi di venue */
.sm-venue-group {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

/* Effetto evidenziazione temporanea */
.sm-venue-highlight {
    box-shadow: 0 0 0 3px #f56e28;
}

/* Intestazione della venue */
.sm-venue-header {
    background-color: #f8f8f8;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sm-venue-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: #333;
}

.sm-venue-location {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Icona per toggle collasso/espansione */
.sm-venue-toggle-icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.sm-venue-toggle-icon:before,
.sm-venue-toggle-icon:after {
    content: '';
    position: absolute;
    background-color: #666;
    transition: transform 0.3s ease;
}

.sm-venue-toggle-icon:before {
    width: 2px;
    height: 16px;
    top: 4px;
    left: 11px;
    transform: scaleY(1);
}

.sm-venue-toggle-collapsed:before {
    transform: scaleY(0);
}

.sm-venue-toggle-icon:after {
    width: 16px;
    height: 2px;
    top: 11px;
    left: 4px;
}

/* Contenitore degli stand in una venue */
.sm-venue-stands {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    transition: max-height 0.5s ease, padding 0.3s ease;
    overflow: hidden;
}

/* Layout per righe delle venue */
.sm-venue-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Riga che occupa tutta la larghezza (venue con 3+ stand) */
.sm-venue-row-full {
    width: 100%;
}

.sm-venue-column-full {
    width: 100%;
}

/* Riga divisa in due colonne (venue con 1-2 stand) */
.sm-venue-row-split {
    width: 100%;
}

.sm-venue-column-half {
    width: 50%;
}

/* Le venue in colonna half hanno stand disposti verticalmente */
.sm-venue-column-half .sm-venue-stands {
    grid-template-columns: 1fr;
}

/* Stato collassato del contenitore */
.sm-venue-stands.sm-venue-collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

/* Stile per i singoli stand */
.sm-stand-item {
    border: 1px solid #eaeaea;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Stand dispari occupano tutta la larghezza */
.sm-stand-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Per gli stand che occupano tutta la larghezza, riorganizza il layout interno */
.sm-stand-item:last-child:nth-child(odd) .sm-stand-details {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

/* Mantieni l'immagine con dimensioni fisse uguali agli altri stand */
.sm-stand-item:last-child:nth-child(odd) .sm-stand-image {
    flex-shrink: 0;
    width: 150px;
    height: auto;
    margin-right: 20px;
    margin-bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Assicurati che l'immagine dentro il container mantenga le proporzioni */
.sm-stand-item:last-child:nth-child(odd) .sm-stand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Il contenuto testuale occupa lo spazio rimanente */
.sm-stand-item:last-child:nth-child(odd) .sm-stand-info {
    flex: 1;
}

.sm-stand-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.sm-stand-header {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.sm-stand-header h4 {
    margin: 0;
    font-size: 1.1em;
    flex-grow: 1;
}

.sm-stand-select {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.sm-stand-select input[type="checkbox"] {
    margin: 0;
}

.sm-stand-details {
    padding: 15px;
}

.sm-stand-image {
    margin-bottom: 15px;
    text-align: center;
    width: 150px;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-stand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.sm-stand-info {
    font-size: 0.95em;
    line-height: 1.5;
}

.sm-stand-info p {
    margin: 0 0 10px 0;
}

.sm-stand-description {
    margin-top: 10px;
    color: #555;
    font-size: 0.9em;
}

.sm-no-image {
    background-color: #f5f5f5;
    color: #888;
    text-align: center;
    padding: 30px 15px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Riepilogo selezione */
.sm-selection-summary {
    margin-top: 20px;
    text-align: right;
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .sm-venue-stands {
        grid-template-columns: 1fr;
    }
    .sm-venue-row {
        display: unset !important;
    }
    .sm-venue-column-half {
        width: 100% !important;
    }    
}

.sm-stand-details p {
    padding-left: 10px !important;
}