/*
 Theme Name: WoodMart Child
 Theme URI: https://xtemos.com
 Description: Child theme for WoodMart
 Author: Playtix
 Author URI: https://www.iartexperience.com.br
 Template: woodmart
 Version: 1.0.1
 Text Domain: woodmart-child
*/

/* Hide select2 for billing_persontype — only on checkout and My Account (radio buttons replace it) */
body.woocommerce-checkout #billing_persontype + .select2-container,
body.woocommerce-account #billing_persontype + .select2-container { display: none !important; }

/* Hide native <select> too (radio buttons are the visible UI) */
select#billing_persontype.playtix-hidden-select { position:absolute;width:1px;height:1px;opacity:0;pointer-events:none; }

/* Hide the extra required asterisks inside person-type radio button labels */
.person-radio-label abbr.required,
#person-type-radio-wrapper abbr.required {
    display: none !important;
}


/* ============================================================
   PERSON TYPE RADIO BUTTONS (shared by Checkout + My Account)
   ============================================================ */
.playtix-hidden-select {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

#billing_persontype_field .select2-container {
    display: none !important;
}

#person-type-radio-wrapper {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.person-radio-label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.person-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.person-radio-ui {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 20px;
    border: 1.5px solid #d1d5db;
    border-radius: 28px;
    box-sizing: border-box;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    user-select: none;
    cursor: pointer;
}

.person-radio-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #888;
    transition: color 0.2s ease;
}

.person-radio-ui:hover {
    border-color: #2D6BC6 !important;
    background: #f0f4ff;
    color: #2D6BC6;
}

.person-radio-ui:hover .person-radio-svg {
    color: #2D6BC6;
}

.person-radio-label input[type="radio"]:checked + .person-radio-ui {
    border-color: #2D6BC6 !important;
    background: #2D6BC6 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(45, 107, 198, 0.3);
}

.person-radio-label input[type="radio"]:checked + .person-radio-ui .person-radio-svg {
    color: #fff;
}

@media (max-width: 480px) {
    #person-type-radio-wrapper {
        flex-direction: column;
    }
    #person-type-radio-wrapper .person-radio-label {
        width: 100%;
    }
}
