/* Sezione UDA per la preparazione progressiva alla prova professionale */

.esame-page {
    padding-bottom: 56px;
}

.esame-kicker,
.esame-eyebrow {
    margin: 0 0 6px;
    color: #0f766e;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.esame-status {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin: 0 0 32px;
    padding: 22px;
    border: 1px solid rgba(15, 118, 110, 0.24);
    border-left: 5px solid #0f766e;
    border-radius: 18px;
    background: rgba(240, 253, 250, 0.9);
    box-shadow: var(--shadow-card);
}

.esame-status h2,
.esame-section-head h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-family: var(--font-display);
    letter-spacing: -0.025em;
}

.esame-status p,
.esame-section-head p {
    max-width: 850px;
    margin: 6px 0 0;
    color: var(--ink-soft);
    line-height: 1.6;
}

.esame-status-pill {
    flex: 0 0 auto;
    max-width: 260px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #115e59;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.esame-section {
    margin: 0 0 42px;
}

.esame-section-head {
    margin-bottom: 18px;
}

.esame-source-grid,
.esame-types-grid,
.esame-principles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.esame-source-card,
.esame-type-card,
.esame-principles-card {
    padding: 20px;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-card);
}

.esame-source-card h3,
.esame-type-card h3,
.esame-principles-card h3 {
    margin: 12px 0 8px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.4;
}

.esame-source-card p,
.esame-type-card p,
.esame-principles-card li {
    color: var(--ink-soft);
    line-height: 1.55;
}

.esame-source-document {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--stroke-soft);
    font-size: 0.86rem;
    font-weight: 700;
}

.esame-source-document a {
    color: #0f766e;
}

.esame-source-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.esame-source-tag.quadro {
    color: #1e3a8a;
    background: #dbeafe;
}

.esame-source-tag.rete {
    color: #6b21a8;
    background: #f3e8ff;
}

.esame-source-tag.curricolo {
    color: #115e59;
    background: #ccfbf1;
}

.esame-source-tag.scelta {
    color: #92400e;
    background: #fef3c7;
}

.esame-principles-card ul,
.esame-type-card ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

.esame-principles-card li + li,
.esame-type-card li + li {
    margin-top: 7px;
}

.esame-type-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.esame-type-letter {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e, #0e7490);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
}

.esame-type-performance {
    margin-bottom: 14px;
}

.esame-type-card details {
    padding-top: 12px;
    border-top: 1px solid var(--stroke-soft);
}

.esame-type-card summary {
    color: #0f766e;
    font-weight: 800;
    cursor: pointer;
}

.esame-template-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.esame-template-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--stroke-soft);
    border-radius: 14px;
    background: var(--card-solid);
}

.esame-template-list p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.esame-template-number {
    display: grid;
    min-width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 800;
}

.esame-year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.esame-year-button {
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--stroke-soft);
    border-radius: 999px;
    background: var(--card-solid);
    color: var(--ink-soft);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.esame-year-button.active {
    border-color: transparent;
    background: #0f766e;
    color: #fff;
}

.esame-count {
    margin: 0 0 12px;
    color: var(--ink-faint);
    font-size: 0.84rem;
    font-weight: 700;
}

.esame-slot {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 17px;
    background: var(--card);
    box-shadow: var(--shadow-card);
}

.esame-slot-header {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border: 0;
    background: linear-gradient(120deg, rgba(15, 118, 110, 0.07), rgba(14, 116, 144, 0.07));
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.esame-slot-id {
    display: grid;
    min-width: 56px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #ccfbf1;
    color: #115e59;
    font-weight: 800;
}

.esame-slot-main {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.esame-slot-main small {
    color: var(--ink-faint);
}

.esame-slot-type {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 800;
}

.esame-slot-chevron {
    color: #0f766e;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.esame-slot.open .esame-slot-chevron {
    transform: rotate(90deg);
}

.esame-slot-body {
    padding: 18px;
    border-top: 1px solid var(--stroke-soft);
}

.esame-identity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.esame-identity-grid > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(240, 253, 250, 0.72);
}

.esame-identity-grid span {
    color: var(--ink-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.esame-identity-grid strong {
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.45;
}

.esame-detail-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--stroke-soft);
}

.esame-detail-section h3 {
    margin: 0 0 10px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.03rem;
}

.esame-detail-section > .esame-source-tag + h3 {
    margin-top: 9px;
}

.esame-detail-section p {
    color: var(--ink-soft);
    line-height: 1.58;
}

.esame-topic,
.esame-prompt {
    padding: 16px;
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 14px;
    background: #fffbeb;
}

.esame-prompt {
    border-color: rgba(15, 118, 110, 0.25);
    background: rgba(240, 253, 250, 0.85);
}

.esame-topic p,
.esame-prompt p {
    margin-bottom: 0;
}

.esame-chip-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.esame-nucleus-chip {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: #f0f9ff;
}

.esame-nucleus-chip strong {
    color: #075985;
}

.esame-nucleus-chip span {
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.esame-nucleus-chip small {
    align-self: flex-start;
    padding: 3px 7px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
    font-weight: 800;
}

.esame-competence-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.esame-competence-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 12px;
    background: rgba(204, 251, 241, 0.55);
}

.esame-competence-list strong {
    flex: 0 0 auto;
    color: #115e59;
}

.esame-competence-list span {
    color: var(--ink-soft);
    line-height: 1.48;
}

.esame-task-grid {
    margin: 0;
    border: 1px solid var(--stroke-soft);
    border-radius: 13px;
    overflow: hidden;
}

.esame-task-grid > div {
    display: grid;
    grid-template-columns: 155px 1fr;
    border-bottom: 1px solid var(--stroke-soft);
}

.esame-task-grid > div:last-child {
    border-bottom: 0;
}

.esame-task-grid dt,
.esame-task-grid dd {
    margin: 0;
    padding: 10px 12px;
}

.esame-task-grid dt {
    color: #115e59;
    background: rgba(240, 253, 250, 0.7);
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.esame-task-grid dd {
    color: var(--ink-soft);
    line-height: 1.5;
}

.esame-method-note,
.esame-hours-check {
    margin: -2px 0 12px;
    font-size: 0.84rem;
}

.esame-optional-subjects {
    margin-top: 12px;
    padding: 13px 15px;
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    background: #f8fafc;
}

.esame-optional-subjects h4 {
    margin: 0 0 5px;
    color: var(--ink);
    font-size: 0.9rem;
}

.esame-optional-subjects p {
    margin: 0 0 8px;
    font-size: 0.82rem;
}

.esame-optional-subjects ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-soft);
    font-size: 0.83rem;
    line-height: 1.5;
}

.esame-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--stroke-soft);
    border-radius: 13px;
    -webkit-overflow-scrolling: touch;
}

.esame-contributions-table,
.esame-rubric-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: var(--card-solid);
    font-size: 0.82rem;
}

.esame-contributions-table th,
.esame-contributions-table td,
.esame-rubric-table th,
.esame-rubric-table td {
    padding: 10px;
    border-right: 1px solid var(--stroke-soft);
    border-bottom: 1px solid var(--stroke-soft);
    color: var(--ink-soft);
    line-height: 1.45;
    text-align: left;
    vertical-align: top;
}

.esame-contributions-table th:last-child,
.esame-contributions-table td:last-child,
.esame-rubric-table th:last-child,
.esame-rubric-table td:last-child {
    border-right: 0;
}

.esame-contributions-table thead th,
.esame-rubric-table thead th,
.esame-contributions-table tfoot th,
.esame-contributions-table tfoot td {
    background: #f0fdfa;
    color: #115e59;
    font-weight: 800;
}

.esame-contributions-table tbody th,
.esame-rubric-table tbody th {
    color: var(--ink);
    font-weight: 800;
}

.esame-rubric-table summary {
    color: #0f766e;
    font-weight: 800;
    cursor: pointer;
}

.esame-rubric-table ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.esame-phase-list {
    display: grid;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.esame-phase-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.esame-phase-list li > span {
    display: grid;
    min-width: 46px;
    min-height: 36px;
    place-items: center;
    border-radius: 10px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.8rem;
    font-weight: 800;
}

.esame-phase-list li > div {
    flex: 1;
    padding: 7px 11px 10px;
    border-bottom: 1px solid var(--stroke-soft);
}

.esame-phase-list p {
    margin: 3px 0 0;
    font-size: 0.86rem;
}

.esame-dossier-grid,
.esame-final-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.esame-dossier-grid article {
    padding: 13px;
    border: 1px solid var(--stroke-soft);
    border-radius: 12px;
    background: var(--card-solid);
}

.esame-dossier-grid h4 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.4;
}

.esame-dossier-grid h4 a {
    color: #0f766e;
}

.esame-dossier-grid p {
    margin: 5px 0 0;
    font-size: 0.82rem;
}

.esame-dossier-grid .esame-caution {
    color: #92400e;
}

.esame-final-grid > .esame-detail-section {
    padding: 15px;
    border: 1px solid var(--stroke-soft);
    border-radius: 13px;
    background: rgba(248, 250, 252, 0.78);
}

.esame-final-grid p {
    margin-bottom: 0;
}

.esame-slot-warning {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    background: #fffbeb;
    color: #78350f;
    line-height: 1.5;
}

.esame-empty {
    padding: 20px;
    border-radius: 14px;
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 760px) {
    .esame-status {
        flex-direction: column;
    }

    .esame-status-pill {
        max-width: none;
    }

    .esame-source-grid,
    .esame-types-grid,
    .esame-principles-grid,
    .esame-template-list,
    .esame-chip-list,
    .esame-dossier-grid,
    .esame-final-grid,
    .esame-identity-grid {
        grid-template-columns: 1fr;
    }

    .esame-slot-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .esame-slot-main {
        min-width: calc(100% - 88px);
    }

    .esame-slot-type {
        margin-left: 70px;
    }

    .esame-task-grid > div {
        grid-template-columns: 1fr;
    }

    .esame-task-grid dd {
        padding-top: 8px;
    }

    .esame-slot-body {
        padding: 14px;
    }

    .esame-topic,
    .esame-prompt {
        padding: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .esame-slot-chevron {
        transition: none;
    }
}
