/* Clicrore Enquiry Form. Inherits the theme font; colour comes from --cef-color. */
.cef {
    --cef-color: #0b4fa8;
    --cef-ink: #0f172a;
    --cef-muted: #64748b;
    --cef-line: #cbd5e1;
    --cef-bg: #fff;
    --cef-error: #b91c1c;
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    color: var(--cef-ink);
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
}

.cef *,
.cef *::before,
.cef *::after {
    box-sizing: border-box;
}

.cef__heading {
    margin: 0 0 14px;
    font-size: 1.35em;
    line-height: 1.25;
}

.cef__field {
    margin: 0 0 14px;
}

.cef label,
.cef__label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--cef-ink);
}

.cef__req {
    color: var(--cef-error);
}

.cef__opt {
    font-weight: 400;
    color: var(--cef-muted);
}

.cef input[type="text"],
.cef input[type="tel"],
.cef input[type="email"],
.cef select,
.cef textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 14px;
    font: inherit;
    font-size: 16px; /* stops iPhone zooming in */
    color: var(--cef-ink);
    background: var(--cef-bg);
    border: 1.5px solid var(--cef-line);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

.cef textarea {
    min-height: 90px;
    resize: vertical;
}

.cef input:focus,
.cef select:focus,
.cef textarea:focus {
    outline: none;
    border-color: var(--cef-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cef-color) 18%, transparent);
}

.cef__phone {
    display: flex;
    align-items: stretch;
}

.cef__cc {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 600;
    color: var(--cef-ink);
    background: #f1f5f9;
    border: 1.5px solid var(--cef-line);
    border-right: 0;
    border-radius: 10px 0 0 10px;
}

.cef__phone input[type="tel"] {
    border-radius: 0 10px 10px 0;
}

.cef__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cef .cef__choice {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.cef__choices .cef__choice {
    padding: 9px 14px;
    border: 1.5px solid var(--cef-line);
    border-radius: 999px;
    background: var(--cef-bg);
}

.cef__choices .cef__choice:has(input:checked) {
    border-color: var(--cef-color);
    background: color-mix(in srgb, var(--cef-color) 8%, #fff);
}

.cef__choice input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    flex-shrink: 0;
    accent-color: var(--cef-color);
}

.cef__consent .cef__choice span {
    font-size: 14px;
}

.cef__privacy {
    margin-left: 4px;
    color: var(--cef-color);
    white-space: nowrap;
}

.cef__notice {
    margin: 8px 0 0 26px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--cef-muted);
}

.cef__notice a {
    color: var(--cef-color);
}

.cef__note-link {
    display: inline-block;
    margin: 0 0 14px;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--cef-color);
    background: none;
    border: 0;
    cursor: pointer;
}

.cef__submit {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 6px 0 0;
    padding: 12px 18px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: var(--cef-color);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: filter .15s, transform .05s;
}

.cef__submit--medium {
    width: auto;
    min-width: 200px;
}

.cef__submit--small {
    width: auto;
    min-width: 0;
    min-height: 42px;
    padding: 8px 20px;
    font-size: 14px;
}

.cef__submit--center {
    margin-left: auto;
    margin-right: auto;
}

.cef__submit--right {
    margin-left: auto;
}

.cef__submit:hover {
    filter: brightness(1.08);
}

.cef__submit:active {
    transform: translateY(1px);
}

.cef__submit[disabled] {
    opacity: .7;
    cursor: wait;
}

.cef__error {
    min-height: 0;
    margin-top: 4px;
    font-size: 13px;
    color: var(--cef-error);
}

.cef__error:empty {
    display: none;
}

.cef .is-invalid input,
.cef .is-invalid select,
.cef .is-invalid textarea {
    border-color: var(--cef-error);
}

.cef__status {
    margin-top: 12px;
    font-size: 15px;
}

.cef__status:empty {
    display: none;
}

.cef__status--ok {
    padding: 14px 16px;
    font-weight: 600;
    color: #14532d;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 10px;
}

.cef__status--bad {
    color: var(--cef-error);
}

.cef__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Pop-up */
.cef-popup {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .55);
}

.cef-popup[hidden] {
    display: none;
}

.cef-popup__box {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .3);
    outline: 0;
}

.cef-popup__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.cef-popup__close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.cef-popup .cef__heading {
    margin-top: 0;
    padding-right: 32px;
}

html.cef-popup-open,
html.cef-popup-open body {
    overflow: hidden;
}

@media (max-width: 480px) {
    .cef-popup {
        padding: 10px;
    }

    .cef-popup__box {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        padding: 18px;
    }
}
