@charset "UTF-8";

.switch-panel {
    width: 100%;
    max-width: var(--panel-max-width);
    overflow: hidden; /* Necessario per non vedere il pannello B che "esce" a destra durante lo slide */
}

.switch-panel-wrapper {
    display: flex;
    width: 200%;
    transition: transform 0.4s var(--ease-standard);
    align-items: flex-start;
}

.switch-pane {
    width: 50%;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
    min-height: 0; /* Permette al pannello di contrarsi se necessario */
}

/* Pannello inattivo: non occupa spazio e non si vede */
.switch-pane.is-inactive {
    height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Durante l'animazione tutto deve essere visibile e fisico */
.switch-panel.is-animating .switch-pane {
    height: auto !important;
    visibility: visible !important;
    overflow: visible !important;
}

.switch-panel.show-detail .switch-panel-wrapper {
    transform: translateX(-50%);
}

/* Assicurati che lo stato attivo sovrascriva is-inactive durante l'animazione */
.switch-panel.show-detail .pane-a,
.switch-panel.show-detail .pane-b {
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
}

/* --- Box Dettaglio Standard --- */
.detail-box-component {
    background: #ffffff;
    border: 1px solid #e0e4e8;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin: 0.5rem;
}

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

/* --- Tasto Back Minimale --- */
.panel-back-btn {
    background: #f0f2f5; /* Un leggero sfondo circolare lo distingue dai semplici expander */
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.panel-back-btn:hover {
    opacity: 0.6;
    background: #e2e8f0;
    color: #1a202c;
    transform: translateX(-2px); /* Feedback visivo di "ritorno" */
}

.panel-back-btn svg {
    width: 18px;
    height: 18px;
}

.detail-title-area {
    flex-grow: 1;
}