/* Estilos generales */
.rcw-client-type {
    margin-bottom: 20px;
}
.form-row-twocol {
    display: flex;
    justify-content: space-between;
}
.rcw-client-type {
    background: #fafafa;
    padding: 2%;
    border-radius: 1em;
}
.form-row-twocol p {
    flex: 1;
}
.rcw-client-type-intro {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Interruptor */
.rcw-switch-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.rcw-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rcw-switch-option {
    font-size: 1em;
    color: #555;
    transition: color 0.3s ease;
}

.rcw-switch-autonomo {
    order: 1;
}

.rcw-switch-empresa {
    order: 3;
}

.rcw-switch-toggle {
    order: 2;
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.rcw-switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rcw-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s ease;
    border-radius: 24px;
}

.rcw-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
}

.rcw-switch-toggle input:checked + .rcw-switch-slider {
    background-color: #0073aa;
}

.rcw-switch-toggle input:checked + .rcw-switch-slider:before {
    transform: translateX(26px);
}

.rcw-switch-toggle input:checked ~ .rcw-switch-empresa,
.rcw-switch-toggle input:not(:checked) ~ .rcw-switch-autonomo {
    color: #0073aa;
    font-weight: bold;
}

/* Campos del formulario */
.rcw-billing-fields .form-row {
    margin-bottom: 15px;
}

.rcw-billing-fields .form-row-first,
.rcw-billing-fields .form-row-last {
    width: 48%;
    display: inline-block;
    vertical-align: top;
}

.rcw-billing-fields .form-row-first {
    margin-right: 4%;
}

.rcw-billing-fields label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.rcw-billing-fields .input-text,
.rcw-billing-fields select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.rcw-billing-fields .input-text:focus,
.rcw-billing-fields select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.rcw-billing-fields .required {
    color: #e74c3c;
}

/* Ocultar campo de empresa */
.rcw-empresa-field[aria-hidden="true"] {
    display: none;
}

/* Mensaje de "Pendiente de aprobación" */
.rcw-pendiente-mensaje {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1em;
}

/* Notificaciones de WooCommerce */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 4px;
}

.woocommerce-notices-wrapper .woocommerce-message {
    background-color: #e7f3e7;
    color: #2e7d32;
}

.woocommerce-notices-wrapper .woocommerce-error {
    background-color: #fce4e4;
    color: #d32f2f;
}

/* Responsividad */
@media (max-width: 768px) {
    .rcw-switch {
        gap: 5px;
    }

    .rcw-switch-option {
        font-size: 0.9em;
    }

    .rcw-switch-toggle {
        width: 40px;
        height: 20px;
    }

    .rcw-switch-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }

    .rcw-switch-toggle input:checked + .rcw-switch-slider:before {
        transform: translateX(20px);
    }

    .rcw-billing-fields .form-row-first,
    .rcw-billing-fields .form-row-last {
        width: 100%;
        margin-right: 0;
    }

    .rcw-billing-fields .input-text,
    .rcw-billing-fields select {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .rcw-client-type-intro {
        font-size: 0.85em;
    }

    .rcw-switch-option {
        font-size: 0.85em;
    }

    .rcw-billing-fields label {
        font-size: 0.9em;
    }
}