/**
 * Smart Shipping – Frontend & Checkout styles.
 * Styled to match the Italiqa (Aperitif Child) theme.
 *
 * Design tokens:
 *   Font:          'Jost', sans-serif
 *   Primary/Gold:  #c3a456
 *   Gold hover:    #e6c575
 *   Gold dark:     #B49D63
 *   Text dark:     #2b2824
 *   Text body:     #000
 *   Text muted:    #817c7b
 *   BG cream:      #f3eddd
 *   BG light:      #ECE7D7
 *   Border:        #c2c2c2
 *   CTA red:       #d43b22
 *   Radius:        0 (Italiqa uses flat/rectangular style)
 *
 * @package SSBPF
 */

/* ═══════════════════════════════════════════════════════
   Product Page – CAP Verification Form
   ═══════════════════════════════════════════════════════ */

.ssbpf-cap-form {
    margin: 20px 0;
    padding: 24px;
    border: 1px solid #c2c2c2;
    border-radius: 0;
    background: #f3eddd;
    font-family: 'Jost', sans-serif;
}

.ssbpf-cap-form__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.ssbpf-cap-form__icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.ssbpf-cap-form__title {
    margin: 0 0 4px;
    font-family: inherit;
    /* // MODIFIED */
    font-size: 20px;
    /* // MODIFIED */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2b2824;
}

.ssbpf-cap-form__desc {
    margin: 0;
    font-size: 16px;
    /* // MODIFIED */
    color: #817c7b;
    line-height: 1.5;
}

.ssbpf-cap-form__input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ssbpf-cap-form__input {
    width: 140px !important;
    padding: 10px 14px !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 16px !important;
    letter-spacing: 2px;
    text-align: center;
    border: 1px solid #808080 !important;
    border-radius: 0 !important;
    background: #fff;
    color: #2b2824;
    transition: border-color 0.2s ease;
}

.ssbpf-cap-form__input:focus {
    border-color: #c3a456 !important;
    outline: none;
    box-shadow: none;
}

.ssbpf-cap-form__btn {
    padding: 10px 28px !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0 !important;
    cursor: pointer;
    color: #fff !important;
    background-color: #c3a456 !important;
    border: 1px solid transparent !important;
    transition: background-color 0.2s ease;
}

.ssbpf-cap-form__btn:hover {
    background-color: #e6c575 !important;
    transform: none;
    box-shadow: none;
}

/* Result */
.ssbpf-cap-form__result {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    /* // MODIFIED */
    font-family: inherit;
    /* // MODIFIED */
    font-size: 16px;
    /* // MODIFIED */
    font-weight: 600;
    /* // MODIFIED */
    animation: ssbpf-fadeIn 0.3s ease;
}

.ssbpf-cap-form__result--success {
    background: #DFF0D8;
    /* // MODIFIED */
    border: 1px solid #3B763D;
    /* // MODIFIED */
    color: #3B763D;
    /* // MODIFIED */
    font-weight: 500;
    /* // MODIFIED */
}

.ssbpf-cap-form__result--error {
    background: #fef2f2;
    /* // MODIFIED */
    border: 1px solid #d43b22;
    /* // MODIFIED */
    color: #991b1b;
    /* // MODIFIED */
}

.ssbpf-cap-form__result--loading {
    background-color: #d4edda;
    /* // MODIFIED */
    border-color: #28a745;
    /* // MODIFIED */
    color: #155724;
    /* // MODIFIED */
}

.ssbpf-cap-form__result-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Disabled add to cart */
.single_add_to_cart_button.ssbpf-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   Checkout – Poste Fresh Section
   ═══════════════════════════════════════════════════════ */

.ssbpf-checkout-section {
    margin: 25px 0;
    padding: 24px;
    border: 1px solid #c2c2c2;
    border-radius: 0;
    background: #fff;
    font-family: 'Jost', sans-serif;
}

.ssbpf-checkout-section--fresh {
    margin-top: 20px;
    /* // MODIFIED */
    padding: 18px 20px;
    /* // MODIFIED */
    border: 1px solid #B49D63;
    /* // MODIFIED */
    background: #f9f6ee;
    /* // MODIFIED */
    font-family: inherit;
    /* // MODIFIED */
}

/* Blocco bottone "Effettua ordine" finché CAP non è validato */
#place_order.ssbpf-checkout-blocked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Status badge inline */
.ssbpf-fresh-status {
    font-family: inherit;
    /* // MODIFIED */
    font-size: 16px;
    /* // MODIFIED */
    line-height: 1.5;
}

.ssbpf-theme-notice {
    font-family: inherit;
    /* // MODIFIED */
    font-size: 16px;
    /* // MODIFIED */
    font-weight: 600;
    /* // MODIFIED */
    padding: 12px 16px;
    /* // MODIFIED */
}

.ssbpf-theme-notice--success {
    background: #DFF0D8;
    /* // MODIFIED */
    border: 1px solid #3B763D;
    /* // MODIFIED */
    color: #3B763D;
    /* // MODIFIED */
    font-weight: 500;
    /* // MODIFIED */
}

.ssbpf-theme-notice--error {
    background: #fef2f2;
    /* // MODIFIED */
    border: 1px solid #d43b22;
    /* // MODIFIED */
    color: #991b1b;
    /* // MODIFIED */
}

.ssbpf-theme-notice--loading {
    background: #f9f9f9;
    /* // MODIFIED */
    border: 1px solid #c2c2c2;
    /* // MODIFIED */
    color: #2b2824;
    /* // MODIFIED */
}

.ssbpf-checkout-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    /* // MODIFIED */
    font-family: inherit;
    /* // MODIFIED */
    font-size: 20px;
    /* // MODIFIED */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2b2824;
}

.ssbpf-checkout-section__icon {
    font-size: 22px;
}

.ssbpf-checkout-section__desc {
    margin: 0 0 12px !important;
    /* // MODIFIED */
    font-size: 16px;
    /* // MODIFIED */
    color: #817c7b;
    line-height: 1.5;
}

/* Availability */
.ssbpf-availability__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    color: #817c7b;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
}

.ssbpf-availability__error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #d43b22;
    border-radius: 0;
    color: #991b1b;
    font-size: 14px;
}

.ssbpf-availability__dates {
    margin-bottom: 16px;
}

.ssbpf-availability__dates label,
.ssbpf-availability__slots label {
    display: block;
    margin-bottom: 6px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #2b2824;
}

.ssbpf-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 12px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    color: #2b2824;
    border: 1px solid #808080;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ssbpf-select:focus {
    border-color: #c3a456;
    outline: none;
}

/* Time Slots */
.ssbpf-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.ssbpf-slot {
    position: relative;
}

.ssbpf-slot input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ssbpf-slot label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #c2c2c2;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Jost', sans-serif !important;
    font-weight: 400 !important;
    transition: all 0.2s ease;
    background: #fff;
}

.ssbpf-slot label:hover {
    border-color: #c3a456;
    background: #f3eddd;
}

.ssbpf-slot input[type="radio"]:checked+label,
.ssbpf-slot--selected label {
    border-color: #c3a456;
    background: #f3eddd;
    border-width: 2px;
}

.ssbpf-slot__time {
    font-size: 14px;
    font-weight: 500;
    color: #2b2824;
}

.ssbpf-slot__price {
    font-size: 13px;
    color: #817c7b;
    font-weight: 600;
}

/* Carrier Info Badge */
.ssbpf-carrier-info {
    margin: 15px 0;
    padding: 14px 18px;
    border-radius: 0;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 500;
    animation: ssbpf-fadeIn 0.3s ease;
}

.ssbpf-carrier-info--brt {
    background: #f3eddd;
    border: 1px solid #B49D63;
    color: #2b2824;
}

.ssbpf-carrier-info--fresh {
    background: #f3eddd;
    border: 1px solid #B49D63;
    color: #2b2824;
}

/* ═══════════════════════════════════════════════════════
   Email Tracking Block (inline styles in PHP, but
   these cover the My Account order detail page)
   ═══════════════════════════════════════════════════════ */

.ssbpf-tracking-section {
    font-family: 'Jost', sans-serif;
}

.ssbpf-tracking-section h2 {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2b2824;
}

.ssbpf-tracking-section .woocommerce-table {
    border-collapse: collapse;
}

.ssbpf-tracking-section .woocommerce-table tr {
    border-bottom: 1px solid #c2c2c2;
}

.ssbpf-tracking-section .woocommerce-table th {
    font-weight: 500;
    color: #817c7b;
    text-align: left;
    padding: 10px 12px;
}

.ssbpf-tracking-section .woocommerce-table td {
    color: #2b2824;
    padding: 10px 12px;
    text-align: left;
}

.ssbpf-tracking-section .woocommerce-table code {
    font-family: monospace;
    font-size: 14px;
    background: #f3eddd;
    padding: 2px 8px;
    border: 1px solid #c2c2c2;
}

.ssbpf-tracking-section .button {
    font-family: 'Jost', sans-serif !important;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff !important;
    background-color: #c3a456 !important;
    border: 1px solid transparent !important;
    border-radius: 0 !important;
    padding: 10px 28px;
    transition: background-color 0.2s ease;
}

.ssbpf-tracking-section .button:hover {
    background-color: #e6c575 !important;
}

/* Spinner */
.ssbpf-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #c2c2c2;
    border-top-color: #c3a456;
    border-radius: 50%;
    animation: ssbpf-spin 0.6s linear infinite;
}

/* ═══════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════ */

@keyframes ssbpf-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ssbpf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .ssbpf-cap-form__input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ssbpf-cap-form__input {
        width: 100% !important;
    }

    .ssbpf-slots {
        grid-template-columns: 1fr;
    }

    .ssbpf-cap-form {
        padding: 16px;
    }

    .ssbpf-checkout-section {
        padding: 16px;
    }
}

/* Slot Picker (defineAvailability) */
.ssbpf-slot-picker {
    background: #fff;
    border: 1px solid #e6dfc9;
    padding: 16px 18px;
    margin-top: 16px;
    font-family: 'Jost', sans-serif;
}

.ssbpf-slot-picker__title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2b2824;
    margin: 0 0 12px;
}

.ssbpf-slot-picker__row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ssbpf-slot-picker__row label {
    flex: 0 0 130px;
    font-size: 13px;
    font-weight: 600;
    color: #2b2824;
}

.ssbpf-slot-picker__row select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #c2c2c2;
    background: #fff;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    color: #2b2824;
}

.ssbpf-slot-picker__row select:focus {
    border-color: #c3a456;
    outline: none;
}

.ssbpf-slot-picker__msg {
    margin-top: 8px;
    font-size: 13px;
    color: #c0392b;
}