html, body {
    height: 100%;
}

/* Override per la pagina del profilo pubblico */
body:has(.public-profile-wrapper) {
    height: auto !important;
    min-height: 100%;
    overflow-y: auto !important;
}

app {
    display: block;
    height: 100%;
}

/* Override per app quando contiene il profilo pubblico */
app:has(.public-profile-wrapper) {
    height: auto !important;
    min-height: 100%;
}

.header-logo {
    flex-shrink: 0;
    /*background-color: currentColor;*/
    background-image: url('../images/Logo.svg'); /* Aggiungi l'immagine di sfondo */
    background-position: center; /* Centra l'immagine di sfondo */
    background-repeat: no-repeat; /* Impedisce la ripetizione dell'immagine di sfondo */
    width: 124px;
    height: 25px;
}


#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

welcome-pdf-viewer {
    width: 100%;
    height: 500px;
}

.welcome-pdf-viewer .dxbrv-toolbar {
    height: 2rem;
}

.pe-pdf-viewer .dxbrv-toolbar {
    height: 2rem;
}

.pe-pdf-viewer {
    width: 100%;
    height: 100vh;
}

.custom-drop-zone {
    padding: 0 !important;
    border-style: dashed !important;
    border-width: 2px !important;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .custom-drop-zone svg {
        width: 32px;
        height: 32px;
    }

.drop-file-icon {
    background-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-position: center center;
    background-color: currentColor;
    width: 32px;
    height: 32px;
    -webkit-mask-image: url("../images/drop-file.png");
    mask-image: url("../images/drop-file.png");
}

label.xaf-item-documentiazienda_inscadenza {
    font-weight: bold !important;
    display: block !important;
    margin-bottom: 0.5em !important;
}

label.xaf-item-documentidipendenti_inscadenza {
    font-weight: bold !important;
    display: block !important;
    margin-bottom: 0.5em !important;
}

label.xaf-item-attestatiinscadenza {
    font-weight: bold !important;
    display: block !important;
    margin-bottom: 0.5em !important;
}

/* SPLASH SCREEN */
/* wrapper: centra il contenuto nello spazio disponibile */
.splash-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh; /* occupa la viewport: l’immagine resta centratissima */
    padding: clamp(16px, 4vw, 48px);
    box-sizing: border-box;
}

/* logo: non oltrepassa mai lo schermo e mantiene il rapporto */
.splash-logo {
    display: block;
    max-width: min(70vw, 700px); /* limita larghezza su desktop larghi */
    max-height: min(60vh, 400px); /* limita altezza: evita tagli verticali */
    width: auto;
    height: auto;
    object-fit: contain; /* fa “letterbox” senza ritagli */
}

.e-main {
    line-height: 1;
}

.e-name {
    --color-opacity: 1;
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.2;
}

.e-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor; /* l’icona prende il colore del testo */
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;
}

.e-icon-birthdate {
    -webkit-mask-image: url("/images/icons/ic_fluent_calendar_12_regular.svg");
    mask-image: url("/images/icons/ic_fluent_calendar_12_regular.svg");
}

.e-icon-building {
    -webkit-mask-image: url("/images/icons/ic_fluent_building_24_regular.svg");
    mask-image: url("/images/icons/ic_fluent_building_24_regular.svg");
}

.e-icon-location {
    -webkit-mask-image: url("/images/icons/ic_fluent_location_12_regular.svg");
    mask-image: url("/images/icons/ic_fluent_location_12_regular.svg");
}

.e-icon-call {
    -webkit-mask-image: url("/images/icons/ic_fluent_call_24_regular.svg");
    mask-image: url("/images/icons/ic_fluent_call_24_regular.svg");
}

.e-icon-mail {
    -webkit-mask-image: url("/images/icons/ic_fluent_mail_24_regular.svg");
    mask-image: url("/images/icons/ic_fluent_mail_24_regular.svg");
}

.e-cf {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.e-role {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.e-photo {
    width: clamp(72px, 8vw, 110px);
    aspect-ratio: 1 / 1; /* force square without extra wrapper */
    height: auto; /* aspect-ratio defines height */
    display: block;
    border-radius: 50%; /* perfect circle */
    overflow: hidden; /* ensure mask (some browsers still need it) */
    border: 1px solid rgba(0,0,0,.15);
    object-fit: cover; /* crop longer edge */
    object-position: 50% 35%; /* slight upward shift (tweak 30–40%) */
    background-color: #f8f9fa; /* placeholder behind transparent images */
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(0,0,0,.05);
    image-rendering: auto;
}

@media (max-width: 479.98px) {
    .e-photo {
        width: 80px;
    }
}

.e-details {
    width: 100%;
}

.e-details .text-container {
    font-size: 0.875rem;
    line-height: 1.125rem;
    white-space: nowrap;
}

.e-details .text-container label {
    font-size: 0.8125rem;
    line-height: 1rem;
}

.e-details .icon-container {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.e-divider {
    height: 1px;
    background-color: currentColor;
}

/* === STILI PER PROFILO PUBBLICO DIPENDENTE === */

/* Wrapper: evita problemi con viewport e garantisce scroll */
.public-profile-wrapper {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Accordion look & feel */
.certificate-accordion .dxbs-accordion-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.certificate-accordion .dxbs-accordion-item-header {
    padding: 1rem 1.25rem;
    font-weight: 500;
    background-color: #f8f9fa;
}

.certificate-accordion .dxbs-accordion-item-header:hover {
    background-color: #e9ecef;
}

.certificate-accordion .list-unstyled li:last-child {
    border-bottom: none !important;
}

/* Regole specifiche per dispositivi touch (Android incluso) */
@media (hover: none) and (pointer: coarse) {
    html, body {
        height: auto !important;
        overflow: auto !important;
    }

    body .public-profile-wrapper {
        overflow: visible !important;
        height: auto !important;
        min-height: 100dvh !important;
    }

    .public-profile-wrapper .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Ulteriore fallback per schermi stretti */
@media (max-width: 480px) {
    .public-profile-wrapper {
        min-height: 100dvh;
    }

    .certificate-accordion .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .certificate-accordion .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .certificate-accordion .d-flex.gap-2 .btn {
        width: 100%;
    }
}

