* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: #f5f7f8; min-height: 100vh; display: flex; flex-direction: column; }

.content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    padding: 40px 44px;
    width: 100%;
    max-width: 460px;
    text-align: center;
}

.card-logo { margin-bottom: 32px; }
.card-logo img { height: 200px; width: auto; }

.section-label { font-size: 12px; color: #888; margin-bottom: 12px; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0;
}
.divider hr { flex: 1; border: none; border-top: 1px solid #e8e8e8; }
.divider span { font-size: 12px; color: #aaa; white-space: nowrap; }

/* --- Bottone CIE --- */
.btn-cie {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #003781;
    border-radius: 40px;
    overflow: hidden;
    text-decoration: none;
    height: 50px;
    width: 100%;
}
.btn-cie:hover { background: #00285e; }
.btn-cie .btn-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.2);
}
.btn-cie .btn-icon img { width: 32px; height: 32px; }
.btn-cie .btn-label {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

/* --- Override bottone SPID (SDK) --- */
#spid-button { width: 100%; }
#spid-button > * { width: 100%; }

a.italia-it-button.italia-it-button-size-l {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 40px !important;
    overflow: hidden !important;
    height: 50px !important;
    width: 100% !important;
}
a.italia-it-button.italia-it-button-size-l .italia-it-button-icon {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 40px 0 0 40px !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
a.italia-it-button.italia-it-button-size-l .italia-it-button-icon img {
    width: 32px !important;
    height: 32px !important;
}
a.italia-it-button.italia-it-button-size-l .italia-it-button-text {
    font-size: 16px !important;
    font-weight: bold !important;
    text-align: center !important;
    width: 100% !important;
}

/* --- Dropdown IdP SPID --- */
.spid-idp-button-tip.spid-idp-button-relative {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    z-index: 9999 !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
    padding: 16px !important;
    border: 1px solid #e0e0e0 !important;
    margin-top: 4px !important;
}

/* Griglia IdP: 4 colonne */
ul.spid-idp-button-menu {
    display: flex !important;
    flex-wrap: wrap !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}
li.spid-idp-button-link {
    width: 25% !important;
    border: none !important;
    padding: 4px !important;
    box-sizing: border-box !important;
}
li.spid-idp-button-link a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 56px !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    padding: 8px !important;
}
li.spid-idp-button-link a:hover {
    border-color: #009dd3 !important;
    background: #f0fafd !important;
}
li.spid-idp-button-link a img {
    max-width: 100px !important;
    max-height: 50px !important;
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    object-fit: contain !important;
}

/* Link di supporto: hover (stile base gestito dal JS) */
li.spid-idp-support-link a:hover { color: #009dd3 !important; }

/* Mobile: 2 colonne */
@media (max-width: 480px) {
    li.spid-idp-button-link { width: 50% !important; }
}
