/* =========================================
   OBDPRICE UK - Service Functions Page
   Complete CSS
   ========================================= */

/* Base */

.obd-sf {
    --sf-red: #d71920;
    --sf-dark: #17212e;
    --sf-muted: #64748b;
    --sf-line: #e4e8ee;
    --sf-light: #f5f7fa;

    width: 100%;
    padding: 30px 18px 75px;
    color: var(--sf-dark);
    background: #fff;
    font-family: inherit;
}

.obd-sf,
.obd-sf * {
    box-sizing: border-box;
}

.obd-sf-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   Hero
   ========================================= */

.obd-sf-hero {
    padding: 54px 55px;
    border: 1px solid #e2e7ef;
    border-radius: 14px;
    background: linear-gradient(120deg,
            #f5f7fb,
            #e9eef6);
}

.obd-sf-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--sf-red);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 1.2px;
}

.obd-sf-hero h1 {
    margin: 0 0 16px;
    color: #111827;
    font-size: clamp(30px, 3.5vw, 44px);
    line-height: 1.2;
    font-weight: 750;
}

.obd-sf-hero p {
    max-width: 720px;
    margin: 0 0 25px;
    color: #536174;
    font-size: 15px;
    line-height: 1.8;
}

/* Primary Buttons */

.obd-sf-primary,
.obd-sf-submit {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    min-height: 45px;
    padding: 12px 24px;

    background: var(--sf-red);
    border: 1px solid var(--sf-red);
    border-radius: 7px;

    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;

    cursor: pointer;
    transition: background .2s ease;
}

.obd-sf-primary:hover,
.obd-sf-submit:hover {
    background: #b9151b;
    color: #fff;
}

/* =========================================
   Section Headings
   ========================================= */

.obd-sf-section-heading {
    margin: 52px 0 24px;
    scroll-margin-top: 130px;
}

.obd-sf-section-heading h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(23px, 2.6vw, 30px);
    font-weight: 750;
    line-height: 1.3;
}

.obd-sf-section-heading p,
.obd-sf-muted {
    margin: 0;
    color: var(--sf-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* =========================================
   Compact Service Functions
   Replaces Original Large Cards
   ========================================= */

.obd-sf-functions-compact {
    width: 100%;
}

/* Function Grid */

.obd-sf-functions-grid {
    display: grid;
    grid-template-columns: repeat(4,
            minmax(0, 1fr));
    gap: 10px;
}

/* Function Tag */

.obd-sf-functions-grid>span {
    display: flex;
    align-items: center;

    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;

    border: 1px solid #e4e8ee;
    border-radius: 7px;
    background: #fff;

    color: #273447;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;

    transition:
        border-color .2s ease,
        background .2s ease;
}

/* Red Check Icon */

.obd-sf-functions-grid>span::before {
    content: "✓";
    flex-shrink: 0;
    margin-right: 8px;

    color: var(--sf-red);
    font-size: 14px;
    font-weight: 700;
}

/* Hover */

.obd-sf-functions-grid>span:hover {
    border-color: #efb4b7;
    background: #fffafa;
}

/* =========================================
   View All Functions
   ========================================= */

.obd-sf-more-functions {
    margin-top: 12px;
}

/* Expand Button */

.obd-sf-more-functions summary {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 12px 15px;

    background: #f8f9fb;
    border: 1px solid #e4e8ee;
    border-radius: 7px;

    color: var(--sf-red);
    font-size: 13px;
    font-weight: 650;
    text-align: center;

    cursor: pointer;
    list-style: none;

    transition:
        background .2s ease,
        border-color .2s ease;
}

.obd-sf-more-functions summary::-webkit-details-marker {
    display: none;
}

.obd-sf-more-functions summary::marker {
    content: "";
}

.obd-sf-more-functions summary:hover {
    background: #fff2f2;
    border-color: #efb4b7;
}

.obd-sf-more-functions summary:focus-visible {
    outline: 2px solid var(--sf-red);
    outline-offset: 3px;
}

/* Expanded Functions */

.obd-sf-more-functions .obd-sf-functions-grid {
    margin-top: 12px;
}

/* Show / Hide Text */

.obd-sf-more-open {
    display: none;
}

.obd-sf-more-functions[open] .obd-sf-more-open {
    display: inline;
}

.obd-sf-more-functions[open] .obd-sf-more-closed {
    display: none;
}

/* =========================================
   Compatibility Notice
   ========================================= */

.obd-sf-compatibility {
    display: flex;
    align-items: flex-start;
    gap: 20px;

    margin-top: 30px;
    padding: 28px 30px;

    background: #fff8f8;
    border: 1px solid #f5dddd;
    border-radius: 11px;
}

.obd-sf-compatibility-icon {
    display: flex;
    justify-content: center;
    align-items: center;

    flex: 0 0 35px;
    width: 35px;
    height: 35px;

    border: 2px solid var(--sf-red);
    border-radius: 50%;

    color: var(--sf-red);
    font-size: 19px;
    font-weight: 750;
}

.obd-sf-compatibility h2 {
    margin: 0 0 12px;
    color: #17212e;
    font-size: 20px;
    line-height: 1.4;
}

.obd-sf-compatibility p {
    margin: 0 0 9px;
    color: #526071;
    font-size: 13px;
    line-height: 1.8;
}

.obd-sf-compatibility p:last-child {
    margin-bottom: 0;
}

/* =========================================
   Enquiry Form Container
   ========================================= */

.obd-sf-form-shell {
    overflow: hidden;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #fff;
}

/* Tabs */

.obd-sf-tabs {
    display: grid;
    grid-template-columns: repeat(2,
            minmax(0, 1fr));
    gap: 0;

    background: #f5f7fa;
    border-bottom: 1px solid var(--sf-line);
}

.obd-sf-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;

    min-height: 90px;
    padding: 22px 30px;

    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;

    color: #344256;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    text-align: left;

    cursor: pointer;
}

.obd-sf-tab small {
    color: #788496;
    font-size: 12px;
    font-weight: 400;
}

.obd-sf-tab.is-active {
    background: #fff;
    border-bottom-color: var(--sf-red);
    color: var(--sf-red);
}

.obd-sf-tab:focus-visible,
.obd-sf-chip:focus-visible,
.obd-sf-submit:focus-visible {
    outline: 2px solid var(--sf-red);
    outline-offset: 2px;
}

/* =========================================
   Form
   ========================================= */

#obd-sf-form {
    padding: 32px;
}

#obd-sf-form h3 {
    margin: 0 0 8px;
    color: #17212e;
    font-size: 22px;
    font-weight: 750;
}

.obd-sf-fields {
    display: grid;
    grid-template-columns: repeat(2,
            minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.obd-sf-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.obd-sf-field>span {
    color: #273447;
    font-size: 13px;
    font-weight: 650;
}

.obd-sf-field em,
.obd-sf-choice-section em {
    color: var(--sf-red);
    font-style: normal;
}

/* Form Inputs */

.obd-sf-field input,
.obd-sf-field select,
.obd-sf-field textarea {
    display: block;
    width: 100%;
    min-height: 45px;
    padding: 11px 13px;

    border: 1px solid #d7dee7;
    border-radius: 6px;
    outline: none;
    background: #fff;

    color: #17212e;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
}

.obd-sf-field textarea {
    min-height: 95px;
    resize: vertical;
}

.obd-sf-field input:focus,
.obd-sf-field select:focus,
.obd-sf-field textarea:focus {
    border-color: var(--sf-red);
    box-shadow: 0 0 0 3px rgba(215,
            25,
            32,
            .08);
}

.obd-sf-field input::placeholder,
.obd-sf-field textarea::placeholder {
    color: #9aa5b4;
}

/* Hidden Input */

.obd-sf-field.obd-sf-hidden {
    display: none;
}

.obd-sf-full {
    margin-top: 22px;
}

/* =========================================
   Service Function Selection
   ========================================= */

.obd-sf-choice-section {
    margin-top: 30px;
}

.obd-sf-choice-section h4 {
    margin: 0 0 7px;
    font-size: 15px;
    font-weight: 700;
}

.obd-sf-choice-section>p {
    margin: 0 0 15px;
    color: var(--sf-muted);
    font-size: 12px;
}

/* Selectable Chips */

.obd-sf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.obd-sf-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 39px;
    padding: 9px 14px;

    border: 1px solid #dfe4eb;
    border-radius: 6px;
    background: #f8fafc;

    color: #344256;
    font-family: inherit;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.35;

    cursor: pointer;
    transition: .2s;
}

.obd-sf-chip:hover {
    border-color: #e99da1;
    background: #fff5f5;
}

.obd-sf-chip.is-selected {
    border-color: var(--sf-red);
    background: #fff0f0;
    color: var(--sf-red);
    font-weight: 700;
}

/* =========================================
   Contact Section
   ========================================= */

.obd-sf-contact {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--sf-line);
}

/* Submit */

.obd-sf-submit {
    width: 100%;
    margin-top: 26px;
    min-height: 49px;
}

/* Form Error */

.obd-sf-form-error {
    margin: 18px 0 0;
    padding: 12px 14px;

    border: 1px solid #efb1b4;
    border-radius: 6px;
    background: #fff3f3;

    color: #b9151b;
    font-size: 13px;
}

.obd-sf-form-error[hidden],
#obd-sf-workshop-panel[hidden],
#obd-sf-owner-panel[hidden] {
    display: none;
}

/* Form Notes */

.obd-sf-form-note {
    margin: 12px 0 0;
    color: #7b8797;
    font-size: 11px;
    line-height: 1.65;
}

/* =========================================
   Tablet
   ========================================= */

@media screen and (max-width: 989px) {

    .obd-sf-hero {
        padding: 40px 32px;
    }

    .obd-sf-functions-grid {
        grid-template-columns: repeat(3,
                minmax(0, 1fr));
    }

}

/* =========================================
   Mobile
   ========================================= */

@media screen and (max-width: 749px) {

    /* Page */

    .obd-sf {
        padding: 18px 12px 45px;
    }

    /* Hero */

    .obd-sf-hero {
        padding: 32px 22px;
        border-radius: 9px;
    }

    .obd-sf-hero h1 {
        font-size: 29px;
    }

    .obd-sf-hero p {
        font-size: 13px;
    }

    /* Headings */

    .obd-sf-section-heading {
        margin: 36px 0 18px;
    }

    .obd-sf-section-heading h2 {
        font-size: 23px;
    }

    /* Compact Service Functions */

    .obd-sf-functions-grid {
        grid-template-columns: repeat(2,
                minmax(0, 1fr));
        gap: 8px;
    }

    .obd-sf-functions-grid>span {
        min-height: 40px;
        padding: 9px 10px;
        font-size: 11px;
        line-height: 1.35;
    }

    .obd-sf-functions-grid>span::before {
        margin-right: 6px;
        font-size: 12px;
    }

    /* Expand Button */

    .obd-sf-more-functions {
        margin-top: 10px;
    }

    .obd-sf-more-functions summary {
        min-height: 42px;
        padding: 11px 12px;
        font-size: 12px;
    }

    .obd-sf-more-functions .obd-sf-functions-grid {
        margin-top: 10px;
    }

    /* Compatibility Notice */

    .obd-sf-compatibility {
        padding: 20px 16px;
        gap: 12px;
        margin-top: 22px;
    }

    .obd-sf-compatibility-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    .obd-sf-compatibility h2 {
        font-size: 17px;
    }

    /* Form Tabs */

    .obd-sf-tab {
        min-height: 80px;
        padding: 17px 12px;
        font-size: 14px;
    }

    .obd-sf-tab small {
        font-size: 10px;
    }

    /* Form */

    #obd-sf-form {
        padding: 22px 16px;
    }

    #obd-sf-form h3 {
        font-size: 19px;
    }

    .obd-sf-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
        margin-top: 20px;
    }

    /* Selectable Functions */

    .obd-sf-chip {
        min-height: 37px;
        padding: 9px 11px;
        font-size: 11px;
    }

    .obd-sf-choice-section {
        margin-top: 25px;
    }

}