/* Enquiry (LMS) form styles, shared by every page with <form data-lms-form>. */

form[data-lms-form] .form-label {
    font-weight: 600;
    margin-bottom: 6px;
}

form[data-lms-form] .lms-products {
    border: 0;
    padding: 0;
    min-width: 0;
}

form[data-lms-form] .lms-products legend {
    float: none;
    font-size: 1rem;
}

/* Product cards: even grid; the native checkbox stays focusable but is hidden, the label is the card. */
form[data-lms-form] .lms-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

form[data-lms-form] .lms-products .form-check {
    position: relative;
    padding: 0;
    margin: 0;
    min-height: 0;
}

form[data-lms-form] .lms-products .form-check-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

form[data-lms-form] .lms-products .form-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 56px;
    padding: 10px 12px;
    background: #fff;
    border: 1.5px solid transparent;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    color: #444;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, background-color .15s, color .15s, box-shadow .15s, transform .15s;
}

/* Icon tile */
form[data-lms-form] .lms-products .lms-product-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f4f4f4;
    color: #c1251c;
    font-size: 17px;
    transition: background-color .15s, color .15s;
}

form[data-lms-form] .lms-products .form-check-label > span {
    flex: 1 1 auto;
    min-width: 0;
}

/* Check circle on the right */
form[data-lms-form] .lms-products .form-check-label::after {
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid #d0d0d0;
    border-radius: 50%;
    background: #fff center / 12px no-repeat;
    transition: background-color .15s, border-color .15s, transform .15s;
}

form[data-lms-form] .lms-products .form-check-label:hover {
    border-color: rgba(193, 37, 28, .3);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .07);
    transform: translateY(-1px);
}

form[data-lms-form] .lms-products .form-check-input:checked + .form-check-label {
    border-color: #c1251c;
    background: #fdf3f2;
    color: #c1251c;
    font-weight: 600;
}

form[data-lms-form] .lms-products .form-check-input:checked + .form-check-label .lms-product-icon {
    background: #c1251c;
    color: #fff;
}

form[data-lms-form] .lms-products .form-check-input:checked + .form-check-label::after {
    border-color: #c1251c;
    background-color: #c1251c;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M3.5 8.5l3 3 6-6.5'/%3e%3c/svg%3e");
    transform: scale(1.05);
}

form[data-lms-form] .lms-products .form-check-input:focus-visible + .form-check-label {
    outline: 2px solid #c1251c;
    outline-offset: 2px;
}

@media (max-width: 575px) {
    form[data-lms-form] .lms-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    form[data-lms-form] .lms-products .form-check-label {
        gap: 8px;
        min-height: 52px;
        padding: 8px 10px;
        font-size: 13px;
    }

    form[data-lms-form] .lms-products .lms-product-icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    form[data-lms-form] .lms-products .form-check-label::after {
        width: 18px;
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    form[data-lms-form] .lms-products .form-check-label:hover {
        transform: none;
    }
}

/* Phone: country-code dropdown and number joined into one box. */
form[data-lms-form] .lms-phone {
    display: flex;
}

form[data-lms-form] .lms-phone-code {
    flex: 0 0 auto;
}

form[data-lms-form] .lms-phone-code select {
    width: 112px;
    padding-right: 32px;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 1px solid rgba(0, 0, 0, .12) !important;
}

form[data-lms-form] .lms-phone-code .bi-caret-down-fill {
    right: 12px;
}

form[data-lms-form] .lms-phone > .form-control {
    flex: 1 1 auto;
    min-width: 0;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Dropdowns: the caret icon sits over the select, so let clicks pass through it. */
form[data-lms-form] select + .bi-caret-down-fill {
    pointer-events: none;
    transition: transform .2s;
}

/* Styled option list where supported (Chrome/Edge 135+); other browsers keep the native list. */
@supports (appearance: base-select) {

    form[data-lms-form] select,
    form[data-lms-form] select::picker(select) {
        appearance: base-select;
    }

    form[data-lms-form] select {
        cursor: pointer;
    }

    form[data-lms-form] select::picker-icon {
        display: none;
    }

    form[data-lms-form] select:open + .bi-caret-down-fill {
        transform: rotate(180deg);
    }

    form[data-lms-form] select::picker(select) {
        margin-top: 6px;
        padding: 6px;
        border: 0;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
    }

    form[data-lms-form] select option {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        border-radius: 8px;
        color: #444;
        font-size: 15px;
        cursor: pointer;
        transition: background-color .12s, color .12s;
    }

    form[data-lms-form] select option[value=""] {
        color: #999;
    }

    form[data-lms-form] select option:hover,
    form[data-lms-form] select option:focus-visible {
        background: #f4f4f4;
        outline: none;
    }

    form[data-lms-form] select option:checked {
        background: #fdf1f0;
        color: #c1251c;
        font-weight: 600;
    }

    form[data-lms-form] select option::checkmark {
        order: 1;
        margin-left: auto;
        color: #c1251c;
    }
}

form[data-lms-form] .lms-error-text,
form[data-lms-form] [data-lms-status].is-error {
    color: #df1529;
}

form[data-lms-form] [data-lms-status].is-success {
    color: #198754;
}

form[data-lms-form] [data-lms-status]:not(:empty) {
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

/* Submit button: keep it inside the grey box with breathing room below. */
form[data-lms-form] {
    padding-bottom: 30px;
}

/* ---------- Mobile ---------- */
@media (max-width: 575px) {
    .bg-grey.Contact-us {
        padding: 24px 16px 0;
        border-radius: 20px 20px 0 0;
    }

    form[data-lms-form] {
        padding-bottom: 24px;
    }

    /* responsive.css floats this button below the box on mobile; keep it in the form, full width. */
    .Contact-us form[data-lms-form] .btn-red-fil,
    .Contact-us form[data-lms-form] .btn-red-fil:focus,
    form[data-lms-form] #submitBtn {
        position: static;
        width: 100%;
        font-size: 16px;
        padding: 12px 20px;
    }

    /* Product cards: hide the empty circle so the name gets the room; show a small tick badge when selected. */
    form[data-lms-form] .lms-products .form-check-label {
        position: relative;
        padding-right: 10px;
    }

    form[data-lms-form] .lms-products .form-check-label::after {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 16px;
        height: 16px;
        background-size: 10px;
        opacity: 0;
        transform: scale(.6);
        transition: opacity .15s, transform .15s, background-color .15s, border-color .15s;
    }

    form[data-lms-form] .lms-products .form-check-input:checked + .form-check-label::after {
        opacity: 1;
        transform: scale(1);
    }
}

/* Contact page: the form sits on a white card, so give product cards the same grey as its inputs. */
.Contact-us-sec form[data-lms-form] .lms-products .form-check-label {
    background: #f0f0f0;
    box-shadow: none;
}

.Contact-us-sec form[data-lms-form] .lms-products .lms-product-icon {
    background: #fff;
}

@media (max-width: 575px) {
    .Contact-us-sec .form-box .form-content {
        padding: 24px 16px 0;
        border-radius: 20px;
    }
}

/* Contact page: the form column is half width from 768px, too narrow for two fields per row until 1200px. */
@media (min-width: 576px) and (max-width: 1199px) {
    .Contact-us-sec form[data-lms-form] .row > .col-sm-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
}
