/**
 * ============================================================
 * FILE: /home/dekdymyz/public_html/assets/css/custom.css
 * ============================================================
 * Stili personalizzati - Sistema Accreditamento "UnPasso"
 * Sovrascrive/estende Bootstrap Italia v2.17.3
 * ============================================================
 */

/* ============================================================
   VARIABILI CSS CUSTOM
   ============================================================ */
:root {
    --unpasso-bg-light: #f5f7fa;
    --unpasso-border-radius: 8px;
    --unpasso-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --unpasso-transition: all 0.25s ease-in-out;
}

/* ============================================================
   LAYOUT GENERALE
   ============================================================ */

/* Contenuto principale: altezza minima per footer in fondo */
#main-content {
    min-height: calc(100vh - 400px);
}

/* Container pagina con padding standard */
.page-container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ============================================================
   STEPPER ACCREDITAMENTO (flusso a step)
   ============================================================ */
.accreditamento-stepper {
    background: var(--unpasso-bg-light);
    border-radius: var(--unpasso-border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* ============================================================
   CARD E FORM
   ============================================================ */

/* Card con ombra personalizzata */
.card-unpasso {
    border-radius: var(--unpasso-border-radius);
    box-shadow: var(--unpasso-shadow);
    border: none;
    transition: var(--unpasso-transition);
}

.card-unpasso:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Form dentro card */
.card-unpasso .card-body {
    padding: 2rem;
}

/* ============================================================
   UPLOAD DOCUMENTI
   ============================================================ */
.upload-zone {
    border: 2px dashed var(--bs-primary);
    border-radius: var(--unpasso-border-radius);
    padding: 2rem;
    text-align: center;
    background: var(--unpasso-bg-light);
    transition: var(--unpasso-transition);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    background: rgba(0, 102, 204, 0.05);
    border-color: var(--bs-primary);
}

.upload-zone .icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

/* Lista documenti caricati */
.doc-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.doc-list-item:last-child {
    border-bottom: none;
}

.doc-list-item .doc-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.doc-list-item .doc-status {
    font-size: 0.875rem;
    font-weight: 600;
}

.doc-status--caricato { color: var(--bs-info); }
.doc-status--verificato { color: var(--bs-success); }
.doc-status--rifiutato { color: var(--bs-danger); }

/* ============================================================
   OTP VERIFICA
   ============================================================ */
.otp-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.otp-input-group input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #ccc;
    border-radius: var(--unpasso-border-radius);
    transition: var(--unpasso-transition);
}

.otp-input-group input:focus {
    border-color: var(--bs-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* ============================================================
   AUTOCOMPLETE DROPDOWN
   ============================================================ */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d9dadb;
    border-top: none;
    border-radius: 0 0 var(--unpasso-border-radius) var(--unpasso-border-radius);
    max-height: 220px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: #e8f0fe;
}

.autocomplete-item strong {
    color: #17324d;
}

/* ============================================================
   STEPPER PERSONALIZZATO (sovrascrittura Bootstrap Italia)
   ============================================================ */
.steppers .steppers-header ul li.confirmed .steppers-number {
    background: #008758;
    color: #fff;
    border-color: #008758;
}

/* Familiare block */
.familiare-block {
    background: var(--unpasso-bg-light);
    border-color: #d9dadb !important;
}

.familiare-block h4 {
    color: #17324d;
}

/* ============================================================
   MESSAGGI / ALERT
   ============================================================ */
.alert-unpasso {
    border-radius: var(--unpasso-border-radius);
    border-left: 4px solid;
}

/* ============================================================
   TABELLE RESPONSIVE
   ============================================================ */
.table-unpasso {
    border-radius: var(--unpasso-border-radius);
    overflow: hidden;
    box-shadow: var(--unpasso-shadow);
}

.table-unpasso thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
}

/* ============================================================
   PAGINA LOGIN / REGISTRAZIONE
   ============================================================ */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 480px;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Nasconde spinner su input number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .it-header-wrapper,
    .it-footer,
    .back-to-top,
    .no-print {
        display: none !important;
    }

    #main-content {
        min-height: auto;
    }
}