/* =========================================================
   Bambini & Genitori Core
   Stile moduli frontend
   ========================================================= */


/* Contenitore principale del modulo */

.bg-core-form {
    width: 100%;
    max-width: 500px;
    margin: 0;
    padding: 0;
    color: #7d7d7d;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-family: inherit;
}


/* Titolo del modulo */

.bg-core-form-title {
    position: relative;
    margin: 0 0 14px;
    padding: 0 45px 7px 0;
    color: #777777;
    border-bottom: 1px solid #999999;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}


/* Eventuale testo introduttivo */

.bg-core-form-description {
    margin: 0 0 28px;
    color: #777777;
    font-size: 17px;
    line-height: 1.65;
}


/* Singolo campo */

.bg-core-field {
    width: 100%;
    margin: 0 0 17px;
    padding: 0;
}


/* Etichette */

.bg-core-field > label,
.bg-core-field label {
    display: block;
    margin: 0 0 4px;
    padding: 0;
    color: #777777;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}


/* Campi testuali */

.bg-core-field input[type="text"],
.bg-core-field input[type="email"],
.bg-core-field input[type="tel"],
.bg-core-field input[type="password"],
.bg-core-field input[type="url"],
.bg-core-field input[type="number"],
.bg-core-field select,
.bg-core-field textarea {
    display: block;
    width: 100%;
    min-height: 39px;
    margin: 0;
    padding: 7px 9px;
    color: #333333;
    background-color: #ffffff;
    border: 1px solid #8d8d8d;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    box-sizing: border-box;
    appearance: none;
    transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease;
}


/* Altezza textarea */

.bg-core-field textarea {
    min-height: 120px;
    resize: vertical;
}


/* Focus */

.bg-core-field input[type="text"]:focus,
.bg-core-field input[type="email"]:focus,
.bg-core-field input[type="tel"]:focus,
.bg-core-field input[type="password"]:focus,
.bg-core-field input[type="url"]:focus,
.bg-core-field input[type="number"]:focus,
.bg-core-field select:focus,
.bg-core-field textarea:focus {
    border-color: #555555;
    box-shadow: 0 0 0 1px #555555;
}


/* Placeholder */

.bg-core-field input::placeholder,
.bg-core-field textarea::placeholder {
    color: #aaaaaa;
    opacity: 1;
}


/* Checkbox privacy */

.bg-core-field-checkbox {
    margin-top: 23px;
    margin-bottom: 20px;
}

.bg-core-field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    color: #777777;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    cursor: pointer;
}

.bg-core-field-checkbox input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 3px 0 0;
    padding: 0;
    accent-color: #777777;
}

.bg-core-field-checkbox a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.bg-core-field-checkbox a:hover {
    color: #444444;
}


/* Pulsante */

.bg-core-actions {
    margin-top: 22px;
}

.bg-core-actions button,
.bg-core-form button[type="submit"],
.bg-core-form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 160px;
    min-height: 43px;
    margin: 0;
    padding: 10px 22px;
    color: #ffffff;
    background-color: #eeaa41;
    border: 1px solid #eeaa41;
    border-radius: 0;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition:
            color 0.2s ease,
            background-color 0.2s ease,
            border-color 0.2s ease;
}

.bg-core-actions button:hover,
.bg-core-form button[type="submit"]:hover,
.bg-core-form input[type="submit"]:hover {
    color: #ffffff;
    background-color: #555555;
    border-color: #555555;
}

.bg-core-actions button:focus-visible,
.bg-core-form button[type="submit"]:focus-visible,
.bg-core-form input[type="submit"]:focus-visible {
    outline: 2px solid #555555;
    outline-offset: 3px;
}


/* Link sotto al modulo */

.bg-core-form-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 20px;
}

.bg-core-form-links a {
    color: #777777;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
}

.bg-core-form-links a:hover {
    color: #444444;
}


/* Messaggi di errore e conferma */

.bg-core-message {
    width: 100%;
    max-width: 500px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.bg-core-message-error {
    color: #8a1f1f;
    background-color: #fff1f1;
    border-color: #d4a0a0;
}

.bg-core-message-success {
    color: #356b35;
    background-color: #f0f8f0;
    border-color: #9dbe9d;
}


/* Messaggi e blocchi area utente */

.bg-core-login-status,
.bg-core-register-status,
.bg-core-welcome {
    width: 100%;
    max-width: 500px;
    margin: 0;
    padding: 18px 20px;
    color: #777777;
    background: transparent;
    border: 1px solid #999999;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
}

.bg-core-login-status p,
.bg-core-register-status p,
.bg-core-welcome p {
    margin-top: 0;
}

.bg-core-login-status p:last-child,
.bg-core-register-status p:last-child,
.bg-core-welcome p:last-child {
    margin-bottom: 0;
}


/* Responsive */

@media (max-width: 767px) {

    .bg-core-form,
    .bg-core-message,
    .bg-core-login-status,
    .bg-core-register-status,
    .bg-core-welcome {
        max-width: 100%;
    }

    .bg-core-form-title {
        font-size: 21px;
    }

    .bg-core-form-description {
        font-size: 16px;
    }

    .bg-core-field > label,
    .bg-core-field label {
        font-size: 15px;
    }

    .bg-core-actions button,
    .bg-core-form button[type="submit"],
    .bg-core-form input[type="submit"] {
        width: 100%;
    }
}

/* =========================================================
   STATISTICHE BORSE DI STUDIO
   Shortcode: [bg_scholarship_stats]
   ========================================================= */

.bg-scholarship-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.bg-scholarship-stat {
    position: relative;
    padding: 28px 22px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-top: 5px solid #2271b1;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    transition:
            transform 0.25s ease,
            box-shadow 0.25s ease;
}

.bg-scholarship-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.10);
}

/* Colori distintivi */

.bg-scholarship-stat-fund {
    border-top-color: #2e7d32;
}

.bg-scholarship-stat-granted {
    border-top-color: #1565c0;
}

.bg-scholarship-stat-used {
    border-top-color: #ef6c00;
}

/* Etichetta */

.bg-scholarship-stat-label {
    display: block;
    margin-bottom: 14px;
    color: #555555;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
}

/* Valore */

.bg-scholarship-stat-value {
    display: block;
    margin-top: 8px;
    color: #222222;
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
}

/* Correzione importo WooCommerce */

.bg-scholarship-stat-value .woocommerce-Price-amount,
.bg-scholarship-stat-value .woocommerce-Price-currencySymbol {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
}

/* Shortcode singoli */

.bg-scholarship-single-value {
    margin: 0;
    color: #222222;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 700;
}

/* Tablet */

@media screen and (max-width: 900px) {

    .bg-scholarship-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bg-scholarship-stat:last-child {
        grid-column: 1 / -1;
    }
}

/* Mobile */

@media screen and (max-width: 600px) {

    .bg-scholarship-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }

    .bg-scholarship-stat:last-child {
        grid-column: auto;
    }

    .bg-scholarship-stat {
        padding: 24px 18px;
    }

    .bg-scholarship-stat-label {
        font-size: 15px;
    }

    .bg-scholarship-stat-value,
    .bg-scholarship-single-value {
        font-size: 34px;
    }
}