/* VIVA_PRODUCT_OPTIONS_MOBILE_V1
   Interface premium para cor, tamanho e quantidade.
   Os controles originais continuam responsáveis pelo formulario.
*/

@media (max-width: 720px) {

    #vf-product-form.vf-options-enhanced {
        display: block;
        width: 100%;
        max-width: none;
        padding: 20px 0 0;
        margin: 0;
        background: transparent;
        border: 0;
        border-top: 1px solid rgba(48, 56, 55, 0.10);
        border-radius: 0;
        box-shadow: none;
    }

    #vf-product-form.vf-options-enhanced > label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 0 9px;
        color: rgba(48, 56, 55, 0.82);
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10.5px;
        font-weight: 800;
        line-height: 15px;
        letter-spacing: 0.10em;
        text-transform: uppercase;
    }

    #vf-product-form.vf-options-enhanced > label:not(:first-of-type) {
        margin-top: 21px;
    }

    /*
       O select original continua presente no formulario.
       Fica visualmente recolhido no mobile.
    */
    #vf-product-form.vf-options-enhanced .vf-native-choice {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
        border: 0 !important;
        opacity: 0.01 !important;
    }

    .vf-option-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .vf-option-button {
        min-width: 54px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 15px;
        border: 1px solid rgba(48, 56, 55, 0.18);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.78);
        color: #303837;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        transition:
            background-color 160ms ease,
            color 160ms ease,
            border-color 160ms ease,
            transform 120ms ease;
        -webkit-tap-highlight-color: transparent;
    }

    .vf-option-group--color .vf-option-button {
        min-width: 84px;
    }

    .vf-option-button:active {
        transform: scale(0.97);
    }

    .vf-option-button.is-selected {
        border-color: #365650;
        background: #365650;
        color: #ffffff;
    }

    .vf-option-button:focus-visible {
        outline: 2px solid rgba(54, 86, 80, 0.30);
        outline-offset: 2px;
    }

    .vf-option-hint {
        width: 100%;
        min-height: 42px;
        display: flex;
        align-items: center;
        padding: 0 13px;
        border: 1px dashed rgba(48, 56, 55, 0.17);
        border-radius: 10px;
        color: rgba(48, 56, 55, 0.55);
        background: rgba(251, 243, 240, 0.34);
        font-size: 12px;
        line-height: 18px;
    }

    /*
       Quantidade mantém o input real.
    */
    .vf-quantity-stepper {
        width: 142px;
        height: 44px;
        display: grid;
        grid-template-columns: 44px 54px 44px;
        overflow: hidden;
        border: 1px solid rgba(48, 56, 55, 0.18);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.78);
    }

    .vf-quantity-stepper button {
        width: 44px;
        height: 42px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #303837;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 22px;
        font-weight: 400;
        line-height: 1;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .vf-quantity-stepper button:active {
        background: rgba(199, 230, 224, 0.42);
    }

    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper
    #vf-quantity {
        width: 54px !important;
        height: 42px !important;
        min-width: 0;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-left: 1px solid rgba(48, 56, 55, 0.10) !important;
        border-right: 1px solid rgba(48, 56, 55, 0.10) !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #303837;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 14px;
        font-weight: 700;
        text-align: center;
        box-shadow: none !important;
        appearance: textfield;
        -moz-appearance: textfield;
    }

    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper
    #vf-quantity::-webkit-inner-spin-button,
    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper
    #vf-quantity::-webkit-outer-spin-button {
        margin: 0;
        -webkit-appearance: none;
    }

    /*
       CTA permanece funcional e visualmente igual nesta etapa.
       Apenas garantimos fluxo abaixo do stepper.
    */
    #vf-product-form.vf-options-enhanced > .vf-primary {
        display: flex;
        width: 100%;
        margin-top: 22px;
    }
}
/* VIVA_PRODUCT_QUANTITY_STEPPER_FIX_V1
   Neutraliza o grid-column herdado do campo original.
*/
@media (max-width: 720px) {

    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper {
        display: grid !important;
        grid-template-columns: 44px 54px 44px !important;
        grid-template-rows: 42px !important;
        width: 142px !important;
        height: 44px !important;
        overflow: hidden;
    }

    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper > button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        grid-column: auto !important;
        grid-row: 1 !important;
        width: 44px !important;
        height: 42px !important;
        margin: 0 !important;
    }

    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper > button:first-child {
        grid-column: 1 !important;
    }

    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper #vf-quantity {
        display: block !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 54px !important;
        height: 42px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #vf-product-form.vf-options-enhanced
    .vf-quantity-stepper > button:last-child {
        grid-column: 3 !important;
    }
}
/* VIVA_PRODUCT_CTA_MOBILE_V1
   CTA principal premium no mobile.
   Altera somente apresentacao visual.
*/
@media (max-width: 720px) {

    #vf-product-form.vf-options-enhanced > .vf-primary {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        min-height: 56px !important;
        height: 56px !important;

        margin-top: 24px !important;
        padding: 0 20px !important;

        border: 1px solid #365650 !important;
        border-radius: 10px !important;

        background: #365650 !important;
        color: #ffffff !important;

        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 12.5px !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        letter-spacing: 0.095em !important;
        text-align: center !important;
        text-transform: uppercase !important;

        box-shadow:
            0 8px 20px rgba(54, 86, 80, 0.16) !important;

        cursor: pointer;

        transition:
            background-color 160ms ease,
            border-color 160ms ease,
            box-shadow 160ms ease,
            transform 120ms ease !important;

        -webkit-tap-highlight-color: transparent;
    }

    #vf-product-form.vf-options-enhanced > .vf-primary:hover {
        border-color: #2f4b46 !important;
        background: #2f4b46 !important;

        box-shadow:
            0 10px 24px rgba(54, 86, 80, 0.20) !important;

        transform: translateY(-1px);
    }

    #vf-product-form.vf-options-enhanced > .vf-primary:active {
        background: #29433e !important;
        border-color: #29433e !important;
        box-shadow:
            0 4px 12px rgba(54, 86, 80, 0.15) !important;
        transform: translateY(0) scale(0.99);
    }

    #vf-product-form.vf-options-enhanced > .vf-primary:focus-visible {
        outline:
            3px solid rgba(54, 86, 80, 0.22) !important;
        outline-offset: 3px;
    }

    #vf-product-form.vf-options-enhanced > .vf-primary:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        box-shadow: none !important;
        transform: none !important;
    }
}
