/* wp-content\themes\gtmotor\assets\css\components\contact.css*/
:root {
    --gt-radius: 999px; /* Full Pill Shape */
    --gt-radius-sm: 16px; /* Textareas */
    --gt-black: #342E37;
    --gt-blue: #2A02FC; /* Matches Figma Submit Button */
    --gt-yellow: #FFC424;
    --gt-grey: #9D9D9D;
    --gt-focus: rgba(42, 2, 252, 0.25);
    --gt-field-shadow: inset 0 0 8px rgba(0, 0, 0, .12);
}

/* --- Wrapper & Layout --- */
.gtm-contact-wrapper {
    scroll-margin-top: 120px;
    background: transparent;
    padding: 0;
    width: 100%;
}

.gtm-contact-wrapper .gtmc-inner {
    max-width: 1376px;
    margin-inline: auto;
}

/* --- Typography --- */
.gtm-contact-wrapper .greyTitle {
    color: var(--gt-grey);
    font-family: "Figtree", sans-serif;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.gtm-contact-wrapper .muted {
    color: var(--gt-black);
    font-family: "Figtree", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 16px;
    margin-top: 24px;
}

.gtm-contact-wrapper .header-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--gt-black);
}

.gtm-contact-wrapper .header-phone .icon {
    width: 26px;
    height: 26px;
    display: inline-block;
    color: var(--gt-black);
    background: currentColor;
    -webkit-mask: var(--gtmc-phone-icon) no-repeat center/contain;
    mask: var(--gtmc-phone-icon) no-repeat center/contain;
}

/* --- Form Elements --- */
.gtm-contact-wrapper .row-gap {
    row-gap: 24px;
}

.gtm-contact-wrapper .form-label {
    color: var(--gt-black);
    font-family: "Figtree", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.gtm-contact-wrapper .form-label.required::after {
    content: " *";
    color: #cb1517;
}

/* Enforce Max Rounded (Pill) on Inputs */
.gtm-contact-wrapper .form-control,
.gtm-contact-wrapper input[type="text"],
.gtm-contact-wrapper input[type="email"],
.gtm-contact-wrapper input[type="tel"],
.gtm-contact-wrapper input[type="date"],
.gtm-contact-wrapper input[type="time"] {
    border: 1px solid var(--gt-black);
    border-radius: var(--gt-radius) !important; /* Force Pill Shape */
    height: 48px;
    padding: 8px 24px;
    box-shadow: var(--gt-field-shadow);
    font-family: "Figtree", sans-serif;
    font-size: 16px;
    color: var(--gt-black);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    background-color: #fff;
}

/* Textarea remains rounded rect */
.gtm-contact-wrapper textarea.form-control {
    border-radius: var(--gt-radius-sm) !important;
    min-height: 168px;
    padding: 16px 24px;
    resize: vertical;
    height: auto;
}

.gtm-contact-wrapper .form-control:focus {
    outline: none;
    border-color: var(--gt-blue);
    box-shadow: 0 0 0 4px var(--gt-focus);
}

.gtm-contact-wrapper .gtmc-hr {
    border: 0;
    height: 2px;
    background: var(--gt-black);
    margin: 32px 0;
    opacity: 1;
}

/* --- Chips (Enquiry Types) --- */
.gtm-contact-wrapper .chip-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 576px) {
    .gtm-contact-wrapper .chip-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .gtm-contact-wrapper .chip-group {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Chip Container */
.gtm-contact-wrapper .chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Text Left, Dot Right */
    min-height: 48px;
    padding: 10px 24px;
    gap: 16px;
    border-radius: var(--gt-radius) !important; /* Force Pill Shape */
    background: #2F2A31; /* Dark Grey Default */
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, transform 0.1s ease;
    text-transform: uppercase;
}

.gtm-contact-wrapper .chip input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* The visual checkbox (Square with rounded corners) */
.gtm-contact-wrapper .chip .dot {
    width: 20px;
    height: 20px;
    border-radius: 4px; /* Small rounded corners for checkbox look */
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
    flex-shrink: 0;
    transition: background 0.2s ease;
    order: 2; /* Ensure it stays on the right if layout shifts */
}

.gtm-contact-wrapper .chip span:first-of-type {
    order: 1;
    text-align: left;
}

/* Active State - Updated to Blue per Figma Screenshot */
.gtm-contact-wrapper .chip.active {
    background: var(--gt-blue); /* Blue Active */
    color: #fff;
}

.gtm-contact-wrapper .chip.active .dot {
    background: #2F2A31; /* Dark check inside */
    box-shadow: inset 0 0 0 6px #fff; /* White border/tick effect */
}

.gtm-contact-wrapper .chip:focus-within {
    box-shadow: 0 0 0 4px var(--gt-focus);
}

/* --- Opt-In Chip (Bottom) --- */
.gtm-contact-wrapper .chip.optin {
    background: #2D2930;
    color: #fff;
    width: auto;
    display: inline-flex;
    margin-right: auto;
}

.gtm-contact-wrapper .chip.optin .tick {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #4B4650;
    transition: background 0.2s ease;
}

.gtm-contact-wrapper .chip.optin input:checked ~ .tick {
    background: #fff;
    box-shadow: inset 0 0 0 5px #2D2930;
}

/* --- Submit Button --- */
.gtm-contact-wrapper .actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.gtm-contact-wrapper .spacer {
    flex: 1 1 auto;
}

.gtm-contact-wrapper .btn-gt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 209px;
    padding: 12px 32px;
    border-radius: var(--gt-radius) !important; /* Force Pill Shape */
    border: 0;
    background: var(--gt-blue);
    color: #fff;
    font-family: "Figtree", sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gtm-contact-wrapper .btn-gt:hover {
    background: var(--gt-blue);
    box-shadow: 0 8px 16px rgba(42, 2, 252, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

.gtm-contact-wrapper .btn-gt:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(42, 2, 252, 0.3);
}

/* --- Animations --- */
.gtm-contact-wrapper.gtmc-flash {
    box-shadow: 0 0 0 4px rgba(255, 204, 0, .6);
    border-radius: 16px;
    transition: box-shadow .8s ease;
}

.chip.gtmc-pulse {
    position: relative;
}

.chip.gtmc-pulse::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 99px;
    box-shadow: 0 0 0 0 rgba(255, 204, 0, .65);
    animation: gtmc-pulse 0.9s ease-out;
}

@keyframes gtmc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, .65); }
    100% { box-shadow: 0 0 0 10px rgba(255, 204, 0, 0); }
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .gtm-contact-wrapper .actions {
        flex-direction: column;
        align-items: stretch;
    }
    .gtm-contact-wrapper .chip.optin {
        width: 100%;
        justify-content: space-between;
    }
    .gtm-contact-wrapper .btn-gt {
        width: 100%;
    }
}