/**
 * WooCommerce Custom Checkout Fields - Public Styles
 */

.wccf-custom-checkout-fields-wrapper {
    background: #fff;
    border: solid 1px #d5d8dc;
    border-radius: var(--sections-border-radius, 3px);
    display: block;
    margin: 0 0 24px 0;
    padding: 16px 30px;
}

.wccf-custom-checkout-fields-wrapper h3 {
    margin-top: 0;
    /* Remove margem do topo do nosso título se ele estiver dentro do wrapper */
    margin-bottom: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.2em;
    /* Ajuste o tamanho do título da seção se necessário */
    color: #333;
}

/* --- Estilos para o Switcher (Toggle Switch) - Neumorfismo --- */
.wccf-custom-checkout-fields-wrapper label.wccf-switcher-main-label {
    display: block;
    margin-bottom: 0.3em;
    font-size: 0.9em;
    color: #555;
}

.wccf-custom-checkout-fields-wrapper .wccf-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    vertical-align: middle;
    box-shadow: 2px 2px 5px #d1d9e6, -2px -2px 5px #f9f9f9;
    border-radius: 11px;
    overflow: hidden;
}

.wccf-custom-checkout-fields-wrapper .wccf-switch input.wccf-field-switcher {
    opacity: 0;
    width: 0;
    height: 0;
}

.wccf-custom-checkout-fields-wrapper .wccf-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 11px;
}

.wccf-custom-checkout-fields-wrapper .wccf-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #f9f9f9;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 50%;
    box-shadow: 1px 1px 3px #d1d9e6;
}

.wccf-custom-checkout-fields-wrapper .wccf-switch input:checked+.wccf-slider {
    background-color: #a7b1be;
}

.wccf-custom-checkout-fields-wrapper .wccf-switch input:focus+.wccf-slider {
    outline: none;
    box-shadow: 1px 1px 3px #d1d9e6, -1px -1px 3px #f9f9f9, 0 0 5px rgba(0, 0, 0, 0.1);
}

.wccf-custom-checkout-fields-wrapper .wccf-switch input:checked+.wccf-slider:before {
    -webkit-transform: translateX(18px);
    -ms-transform: translateX(18px);
    transform: translateX(18px);
}


/* --- Formatação dos Radio Buttons --- */

/* Rótulo principal do grupo de radio buttons (gerado manualmente no PHP) */
.wccf-custom-checkout-fields-wrapper p.form-row>label.required_field:first-child,
.wccf-custom-checkout-fields-wrapper p.form-row>label:not(.required_field):first-child {
    display: block;
    margin-bottom: 0.75em;
    font-weight: bold;
}

/* Wrapper para todas as opções de rádio (nosso span manual) */
.wccf-custom-checkout-fields-wrapper .wccf-radio-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* Cada par input+label de rádio (nosso span manual .wccf-radio-option) */
.wccf-custom-checkout-fields-wrapper .wccf-radio-option {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.wccf-custom-checkout-fields-wrapper .wccf-radio-option input[type="radio"].wccf-field-radio {
    margin-right: 0.5em;
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

.wccf-custom-checkout-fields-wrapper .wccf-radio-option label.radio {
    margin-bottom: 0;
    font-weight: normal;
}

/* O asterisco (*) nas opções individuais de rádio é omitido na renderização manual do PHP,
   então não precisamos mais de CSS para escondê-lo especificamente ali.
   Apenas o label principal do grupo (se obrigatório) terá o asterisco. */