/* YITH Addons Custom Styling - Black and White */

/* Target the overall container */
#yith_wapo_groups_container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

/* Make each option take up roughly half the width on mobile, and maybe 1/3 or 1/4 on desktop */
.ywapo_group_container_number {
    flex: 0 0 calc(50% - 7.5px);
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Ensure options container takes full width of its parent */
.ywapo_group_container_number .ywapo_options_container {
    width: 100%;
}

.ywapo_group_container_number .ywapo_input_container_number {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Prevent placeholder text from flashing on page load */
.ywapo_input_container input[type="number"]::placeholder,
.ywapo_input_container input[type="text"]::placeholder {
    color: transparent !important;
}

/* Style the label */
.ywapo_group_container_number .ywapo_label {
    font-weight: bold;
    color: #000;
    margin-bottom: 8px;
    font-size: 14px;
    display: block;
}

/* The actual input and buttons wrapper */
/* We will use JS to restructure this slightly or just style it with flexbox if JS doesn't restructure */
/* Assuming the structure: 
    <input>
    <div class="quantity-nav">
       <div class="quantity-up">+</div>
       <div class="quantity-down">-</div>
    </div>
   We need it to look like: [-]  [  number  ]  [+]
*/

/* Hide the default quantity-nav if it exists because we will inject our own buttons for easier styling, or restyle existing */
.ywapo_group_container_number .quantity-nav {
    display: none !important; /* Hide theme's default up/down arrows */
}

/* Our custom wrapper that JS will add */
.custom-quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
    height: 40px;
    background: #fff;
}

.custom-quantity-wrapper .qty-btn {
    flex: 0 0 35px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff; /* Black and white only */
    color: #000;
    font-weight: bold;
    font-size: 18px;
    user-select: none;
    transition: background 0.2s;
}

.custom-quantity-wrapper .qty-btn:hover {
    background: #f0f0f0;
}

.custom-quantity-wrapper .qty-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #fff;
}

/* Hide default number input arrows */
.ywapo_group_container_number input[type="number"] {
    -moz-appearance: textfield;
    flex: 1;
    height: 100%;
    border: none !important;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent;
    width: 100%;
}

.ywapo_group_container_number input[type="number"]::-webkit-outer-spin-button,
.ywapo_group_container_number input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Warning message */
.ywapo-total-warning {
    width: 100%;
    padding: 10px 0;
    color: #000 !important; /* Requested black and white */
    font-weight: bold;
    font-size: 14px;
    border-top: 1px solid #000;
    margin-top: 15px;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .ywapo_group_container_number {
        flex: 0 0 calc(50% - 7.5px);
    }
}
