/* =========================================================
   MG PHONE VALUATION
   Modern / Lightweight / Native Select UI
   CSS ONLY — No JS / AJAX / Libraries
   ========================================================= */

.mg-phone-valuation {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mg-phone-valuation *,
.mg-phone-valuation *::before,
.mg-phone-valuation *::after {
    box-sizing: border-box;
}


/* =========================================================
   FIELDS
   ========================================================= */

.mg-pv-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}


.mg-pv-field {
    flex: 1 1 0;
    min-width: 0;
}


/* =========================================================
   LABEL
   ========================================================= */

.mg-pv-field label {
    display: block;
    margin: 0 0 8px;
    color: #171717;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}


/* =========================================================
   SELECT WRAPPER
   ========================================================= */

.mg-pv-field {
    position: relative;
}


/* =========================================================
   SELECT
   ========================================================= */

.mg-pv-field select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 54px;

    padding: 0 46px 0 16px;

    border: 1px solid #d9d9d9;
    border-radius: 12px;

    background-color: #fff;

    color: #171717;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}


/* =========================================================
   CUSTOM CHEVRON
   ========================================================= */

.mg-pv-field::after {
    content: "";
    position: absolute;

    right: 18px;
    top: calc(50% + 4px);

    width: 8px;
    height: 8px;

    border-right: 1.7px solid #555;
    border-bottom: 1.7px solid #555;

    transform: translateY(-50%) rotate(45deg);

    pointer-events: none;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
}


/* =========================================================
   HOVER
   ========================================================= */

.mg-pv-field select:hover:not(:disabled) {
    border-color: #b9b9b9;
}


/* =========================================================
   FOCUS
   ========================================================= */

.mg-pv-field select:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}


/* =========================================================
   FOCUS + CHEVRON
   ========================================================= */

.mg-pv-field:focus-within::after {
    border-color: #111;
    transform: translateY(-25%) rotate(225deg);
}


/* =========================================================
   DISABLED
   ========================================================= */

.mg-pv-field select:disabled {
    background-color: #f6f6f6;
    border-color: #e5e5e5;
    color: #999;

    cursor: not-allowed;
}

.mg-pv-field:has(select:disabled)::after {
    border-color: #aaa;
}


/* =========================================================
   PLACEHOLDER
   ========================================================= */

.mg-pv-field select:invalid {
    color: #777;
}

.mg-pv-field select option {
    color: #171717;
}

.mg-pv-field select option[value=""] {
    color: #777;
}


/* =========================================================
   RESULT
   ========================================================= */

.mg-pv-result {
    margin-top: 20px;
}


/* =========================================================
   PRICE
   ========================================================= */

.mg-pv-price {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 64px;

    padding: 12px 18px;

    border-radius: 12px;

    background: #111;
    color: #fff;
}


/* =========================================================
   SELL BUTTON
   ========================================================= */

.mg-pv-sell {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 0 22px;

    border: 0;
    border-radius: 10px;

    background: #f16b24;
    color: #fff;

    font-size: 14px;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.mg-pv-sell:hover {
    background: #d95716;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.mg-pv-sell:focus-visible {
    outline: 3px solid rgba(241, 107, 36, 0.25);
    outline-offset: 2px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

    .mg-pv-fields {
   flex-direction: column;
        gap: 14px;
    }
    .mg-pv-field {
        width: 100%;
        flex: 1 1 100%;
    }
    .mg-pv-field select {
        height: 52px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .mg-pv-fields {
        gap: 12px;
    }

    .mg-pv-field label {
        margin-bottom: 7px;
        font-size: 13px;
    }

    .mg-pv-field select {
        height: 52px;
        padding-left: 14px;
        padding-right: 42px;
        border-radius: 11px;
        font-size: 15px;
    }

    .mg-pv-field::after {
        right: 16px;
    }

    .mg-pv-price {
        min-height: 58px;
        padding: 10px 14px;
        border-radius: 11px;
    }

    .mg-pv-sell {
        min-height: 44px;
        padding: 0 18px;
        border-radius: 9px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .mg-pv-field select,
    .mg-pv-field::after,
    .mg-pv-sell {
        transition: none;
    }
}