:root {
    --brand-primary: #00aeef; /* nuovo primary */
    --brand-primary-600: #0096cc; /* hover */
    --brand-primary-700: #007aad; /* active */
    --brand-ink: #001e46;
    --brand-bg: #F5FAFD;
}

:root {
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: 0,174,239;
    --bs-body-font-family: "Montserrat", system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
    --bs-body-color: var(--brand-ink);
    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: var(--brand-primary-700);
}

body {
    background: url('/img/bg-page.jpg') no-repeat center top fixed;
    background-size: cover;
}

body.layout-top-nav .content-wrapper {
    background-color: transparent !important;
}

.apcoa-header {
    position: relative;
    z-index: 10; /* sta sopra allo sfondo */
}

.apcoa-logo {
    width: 200px; /* puoi regolare la dimensione */
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); /* leggero effetto di nitidezza */
}

@media (max-width: 576px) {
    .apcoa-logo {
        width: 150px;
    }
}

/* Card */
.pay-card.card {
    border: 1px solid #E6F3FA;
    border-radius: 1rem;
}

.pay-card .card-header {
    padding: 1.25rem 1.25rem .75rem;
    background: #fff;
    border-bottom: 0;
}

.pay-title {
    font-weight: 700;
    letter-spacing: .2px;
}

/* Badge brand */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .95rem;
    color: #00aeef;
    background: #e6f5fd;
    border: 1px solid rgba(91,202,239,.25);
    padding: .35rem .6rem;
    border-radius: 999px;
}

.link-underline {
    color: #00aeef !important;
}

/* Inputs */
.form-control {
    border-radius: .75rem;
    padding: .625rem .875rem;
}

    .form-control:focus {
        box-shadow: 0 0 0 .25rem rgba(91,202,239,.25);
        border-color: var(--brand-primary-600);
    }

/* Buttons */
.btn-primary {
    background: var(--brand-primary) !important;
    border-radius: .75rem;
    border-color: var(--brand-primary-600);
}

.btn-primary:hover {
    background: var(--brand-primary-600);
    border-color: var(--brand-primary-700);
}

.btn-primary:active {
    background: var(--brand-primary-700) !important;
}

.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff !important;
    background-color: var(--brand-primary-600) !important;
    border-color: var(--brand-primary-600) !important;
}

.btn-outline-primary:active {
    color: #fff !important;
    background-color: var(--brand-primary-700) !important;
    border-color: var(--brand-primary-700) !important;
}

.btn-secondary {
    border-radius: .75rem;
}

/* Importo */
.amount-big {
    font-size: clamp(1.5rem,1.2rem + 1.2vw,2.25rem);
    font-weight: 700;
}

/* Required helper: aggiunge asterisco quando .is-required è sul contenitore */
.is-required > .form-label::after {
    content: " *";
    color: #dc3545;
    font-weight: 700;
}

/* Bottone loading (senza inline HTML) */
.btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: .8;
}

    .btn.is-loading::after {
        content: "";
        position: absolute;
        right: .75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        border: .2rem solid rgba(0,0,0,.15);
        border-top-color: currentColor;
        border-radius: 50%;
        animation: spin .8s linear infinite;
    }

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.site-footer {
    color: #6b7a90;
}


.toast {
    border-radius: 0 !important;
}

/* Variante danger coerente con il tema */
.text-danger {
    color: #dc3545 !important;
}

.border-danger {
    border-color: #dc3545 !important;
}
/* Bottoni outline più leggibili su hover */
.btn-outline-secondary:hover {
    color: #fff;
}

.cf-turnstile {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.form-control.is-valid,
.was-validated .form-control:valid {
    border-color: #78b51a !important;
}

.text-success {
    color: #78b51a !important;
}

btn-outline-success {
    color: #78b51a !important;
    border-color: #78b51a !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    color: #fff !important;
    background-color: #78b51a !important;
    border-color: #78b51a !important;
}

.btn-outline-success:active {
    color: #fff !important;
    background-color: #5e9c13 !important; /* un po’ più scuro */
    border-color: #5e9c13 !important;
}

.bi-check-circle-fill {
    color: #78b51a !important;
}

.text-success .bi-check-circle-fill {
    color: #78b51a !important;
}

.alert-success {
    color: #2f470c; /* testo più scuro, leggibile */
    background-color: rgba(120,181,26,0.15);
    border-color: rgba(120,181,26,0.3);
}