.external-auth-wrap {
    max-width: 560px;
    margin: 24px auto;
    font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
    color: #16324f;
    box-sizing: border-box;
}

.external-auth-wrap,
.external-auth-wrap * {
    box-sizing: border-box;
}

.external-auth-message {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #dfb278;
    background: #fff7ef;
    color: #6f3e07;
    border-radius: 3px;
    font-size: 13px;
}

.external-auth-alert {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #d26a6a;
    background: #fff0f0;
    color: #9e2020;
    border-radius: 3px;
    font-size: 13px;
}

.external-auth-heading {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #16324f;
}

.external-auth-card {
    border: 1px solid #d7dde7;
    background: #fff;
}

.external-auth-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d7dde7;
}

.external-auth-tab {
    border: 0;
    border-right: 1px solid #d7dde7;
    background: #fff;
    color: #003366;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.external-auth-tab:last-child {
    border-right: 0;
}

.external-auth-tab.is-active {
    box-shadow: inset 0 3px 0 #003366;
}

.external-auth-tab-icon {
    width: 15px;
    height: 15px;
}

.external-auth-tab-icon-cie {
    background: #0053a2;
    border-radius: 2px;
    padding: 1px;
    box-sizing: border-box;
}

.external-auth-spacer {
    height: 32px;
}

.external-auth-body {
    padding: 14px;
    min-height: 0;
}

.external-auth-panel {
    display: none;
    min-height: 0;
}

.external-auth-panel.is-active {
    display: block;
}

.external-auth-panel:not(.is-active) {
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
}

.external-auth-copy {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
}

.external-auth-copy strong {
    font-weight: 700;
}

.external-auth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.external-auth-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.external-auth-links a {
    display: inline;
    font-size: 14px;
    color: #003366;
    text-decoration: underline;
}

.external-auth-action {
    margin: 0;
}

.italia-it-button {
    border: 0 !important;
    cursor: pointer;
    border-radius: 0 !important;
    background: #0053a2 !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    margin: 0 !important;
    padding: 0 18px 0 0 !important;
    gap: 10px;
}

.italia-it-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.italia-it-button-icon {
    width: auto !important;
    min-width: 0 !important;
    height: 26px !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-right: 10px;
    border-right: 1px solid rgba(255, 255, 255, .5);
}

.italia-it-button-icon img {
    width: 26px !important;
    height: 26px !important;
    max-width: none !important;
}

.italia-it-button-text {
    display: inline-block;
    padding: 0;
    line-height: 48px;
    font-size: 18px;
    white-space: nowrap;
    color: #fff !important;
}

.cie-button {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
}

.cie-button img {
    height: 46px !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
}

.external-auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.external-auth-footer img {
    max-height: 26px;
    width: auto;
}

.external-auth-footer .external-auth-footer-combined {
    max-height: 34px;
    width: auto;
}

.external-auth-footer .external-auth-footer-ministero {
    max-height: 34px;
    width: auto;
}

.external-auth-tab:focus,
.italia-it-button:focus,
.external-auth-links a:focus {
    outline: 2px solid #003366;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .external-auth-wrap {
        max-width: 100%;
    }

    .external-auth-tabs {
        flex-wrap: nowrap;
    }

    .external-auth-tab {
        flex: 1 1 0;
        justify-content: center;
    }

    .external-auth-row {
        flex-direction: column;
        align-items: stretch;
    }

    .external-auth-copy,
    .external-auth-links a {
        font-size: 13px;
    }

    .italia-it-button,
    .cie-button {
        width: 100%;
        justify-content: center;
    }

    .italia-it-button-icon {
        min-width: 0 !important;
        width: auto !important;
        height: 22px !important;
    }

    .italia-it-button-icon img {
        width: 22px !important;
        height: 22px !important;
    }

    .italia-it-button-text {
        font-size: 18px;
        line-height: 44px;
    }
}
