/* ==========================================================================
   Form styles — used by the placeholder and Contact Form 7
   ========================================================================== */

/* ----- Estimate popup intro (left column) ----- */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: rgba(6, 6, 6, 0.4);
}
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: rgba(6, 6, 6, 0.4);
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: rgba(6, 6, 6, 0.4);
}
input::placeholder,
textarea::placeholder {
    color: rgba(6, 6, 6, 0.4);
}

.estimate-popup__title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(1.6rem, 2.375rem, 2.375rem);
    color: #000;
    margin: 0 0 10px;
    line-height: 1.2;
}
.estimate-popup__subtitle {
    color: var(--color-fg);
    margin: 0 0 36px;
    font-size: 1.125rem;
    line-height: 1.2;
    font-weight: 500;
}
.estimate-popup__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 60px;
}
.estimate-popup__features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #354A62;
    font-weight: 500;
    font-size: 1.125rem;
}
.estimate-popup__feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-fg);
}
.estimate-popup__feature-icon svg { width: 22px; height: 22px; }
.estimate-popup__feature-icon img { max-width: 22px; max-height: 22px; }

/* ----- Form layout ----- */

.kb-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}
.kb-form__placeholder { display: contents; }

/* Checkbox group */

.kb-checkboxes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.kb-check {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: .98rem;
    color: var(--color-fg);
    user-select: none;
}
.kb-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.kb-check__box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--color-bg-soft);
    border: 1px solid transparent;
    flex: 0 0 auto;
    position: relative;
    transition: background var(--transition), border-color var(--transition);
}
.kb-check input[type="checkbox"]:checked + .kb-check__box {
    background: var(--color-accent);
    border-color: var(--color-accent);
}
.kb-check input[type="checkbox"]:checked + .kb-check__box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 7px;
    height: 12px;
    border: solid var(--color-fg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.kb-check input[type="checkbox"]:focus-visible + .kb-check__box {
    outline: 2px solid var(--color-accent-dark);
    outline-offset: 2px;
}

/* Text inputs (with leading icon) */

.kb-field {
    position: relative;
}
.kb-field input,
.kb-field textarea {
    width: 100%;
    height: 50px;
    padding: 12px 16px 12px 46px;
    background: var(--color-bg-soft);
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    color: var(--color-fg);
    transition: border-color var(--transition), background var(--transition);
}
.kb-field textarea { height: auto; min-height: 110px; padding-top: 14px; resize: vertical; }
.kb-field input::placeholder,
.kb-field textarea::placeholder { color: var(--color-fg-muted); }
.kb-field input:focus,
.kb-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #fff;
}
.kb-field::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: .55;
    pointer-events: none;
}
.kb-field--user::before  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8'/></svg>"); }
.kb-field--email::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><path d='M3 7l9 6 9-6'/></svg>"); }
.kb-field--phone::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='6' y='3' width='12' height='18' rx='2'/><path d='M11 18h2'/></svg>"); }

/* Submit / placeholder button */

.kb-form__submit {
    margin-top: 6px;
    height: 50px;
    border-radius: 10px;
    font-weight: 600;
}
.kb-form__submit svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition);
}
.kb-form__submit:hover svg { transform: translateX(3px); }

/* ===== Contact Form 7 overrides — match the placeholder styling ===== */

.kb-form .wpcf7 form,
.kb-form .wpcf7-form {
    display: flex;
    flex-direction: column;
}
.kb-form .wpcf7-form-control-wrap { display: block; position: relative; }
.cb_body_form_inner {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kb-form .wpcf7-form-control[type="text"],
.kb-form .wpcf7-form-control[type="email"],
.kb-form .wpcf7-form-control[type="tel"],
.kb-form .wpcf7-form-control[type="url"],
.kb-form .wpcf7-form-control[type="number"],
.kb-form select.wpcf7-form-control,
.kb-form .wpcf7-textarea {
    width: 100%;
    padding: 15px 15px 15px 49px;
    background: rgba(56, 56, 54, 0.1);
    border-radius: var(--radius-sm);
    color: #060606;
    font: inherit;
    transition: border-color var(--transition), background var(--transition);
    font-size: 1.125rem;
    line-height: 1.2;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.kb-form .wpcf7-textarea { height: auto; min-height: 110px; padding-top: 14px; resize: vertical; }

/* CF7 leading icons by field name (data-name attribute is on the wrapper). */
.kb-form .wpcf7-form-control-wrap[data-name]::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 15px;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: .55;
    pointer-events: none;
    z-index: 1;
}
.kb-form .wpcf7-form-control-wrap[data-name="your-name"]::before,
.kb-form .wpcf7-form-control-wrap[data-name="name"]::before {
    background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12C14.7614 12 17 9.76142 17 7C17 4.23858 14.7614 2 12 2C9.23858 2 7 4.23858 7 7C7 9.76142 9.23858 12 12 12Z" stroke="%238F8F8E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.5901 22C20.5901 18.13 16.7402 15 12.0002 15C7.26015 15 3.41016 18.13 3.41016 22" stroke="%238F8F8E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.kb-form .wpcf7-form-control-wrap[data-name="your-name"]:focus-within::before,
.kb-form .wpcf7-form-control-wrap[data-name="name"]:focus-within::before {
    background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12C14.7614 12 17 9.76142 17 7C17 4.23858 14.7614 2 12 2C9.23858 2 7 4.23858 7 7C7 9.76142 9.23858 12 12 12Z" stroke="%23060606" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.5901 22C20.5901 18.13 16.7402 15 12.0002 15C7.26015 15 3.41016 18.13 3.41016 22" stroke="%23060606" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.kb-form .wpcf7-form-control-wrap[data-name="your-email"]::before,
.kb-form .wpcf7-form-control-wrap[data-name="email"]::before {
    background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17 20.5H7C4 20.5 2 19 2 15.5V8.5C2 5 4 3.5 7 3.5H17C20 3.5 22 5 22 8.5V15.5C22 19 20 20.5 17 20.5Z" stroke="%238F8F8E" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M17 9L13.87 11.5C12.84 12.32 11.15 12.32 10.12 11.5L7 9" stroke="%238F8F8E" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.kb-form .wpcf7-form-control-wrap[data-name="your-email"]:focus-within::before,
.kb-form .wpcf7-form-control-wrap[data-name="email"]:focus-within::before {
    background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17 20.5H7C4 20.5 2 19 2 15.5V8.5C2 5 4 3.5 7 3.5H17C20 3.5 22 5 22 8.5V15.5C22 19 20 20.5 17 20.5Z" stroke="%23060606" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M17 9L13.87 11.5C12.84 12.32 11.15 12.32 10.12 11.5L7 9" stroke="%23060606" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.kb-form .wpcf7-form-control-wrap[data-name="your-phone"]::before,
.kb-form .wpcf7-form-control-wrap[data-name="phone"]::before,
.kb-form .wpcf7-form-control-wrap[data-name="tel"]::before {
    background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 7V17C20 21 19 22 15 22H9C5 22 4 21 4 17V7C4 3 5 2 9 2H15C19 2 20 3 20 7Z" stroke="%238F8F8E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M14 5.5H10" stroke="%238F8F8E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.55 19.1C12.406 19.1 13.1 18.406 13.1 17.55C13.1 16.694 12.406 16 11.55 16C10.694 16 10 16.694 10 17.55C10 18.406 10.694 19.1 11.55 19.1Z" stroke="%238F8F8E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.kb-form .wpcf7-form-control-wrap[data-name="your-phone"]:focus-within::before,
.kb-form .wpcf7-form-control-wrap[data-name="phone"]:focus-within::before,
.kb-form .wpcf7-form-control-wrap[data-name="tel"]:focus-within::before {
    background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 7V17C20 21 19 22 15 22H9C5 22 4 21 4 17V7C4 3 5 2 9 2H15C19 2 20 3 20 7Z" stroke="%23060606" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M14 5.5H10" stroke="%23060606" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.55 19.1C12.406 19.1 13.1 18.406 13.1 17.55C13.1 16.694 12.406 16 11.55 16C10.694 16 10 16.694 10 17.55C10 18.406 10.694 19.1 11.55 19.1Z" stroke="%23060606" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* Wrappers for fields without an icon — neutralize padding-left so they don't look misaligned. */
.kb-form .wpcf7-form-control-wrap:not([data-name="your-name"]):not([data-name="name"]):not([data-name="your-email"]):not([data-name="email"]):not([data-name="your-phone"]):not([data-name="phone"]):not([data-name="tel"]) input.wpcf7-form-control,
.kb-form .wpcf7-form-control-wrap:not([data-name="your-name"]):not([data-name="name"]):not([data-name="your-email"]):not([data-name="email"]):not([data-name="your-phone"]):not([data-name="phone"]):not([data-name="tel"]) textarea.wpcf7-form-control {
    padding-left: 16px;
}

/* CF7 checkboxes — restyle as the design's pseudo-checkboxes. */
.kb-form .wpcf7-checkbox,
.kb-form .wpcf7-radio {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 6px;
}
.kb-form .wpcf7-list-item {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.kb-form .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    color: #060606;
    font-size: 1.125rem;
    line-height: 1.2;
    font-weight: 500;
}
.kb-form .wpcf7-list-item input[type="checkbox"],
.kb-form .wpcf7-list-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin: 0;
    position: relative;
    flex: 0 0 auto;
    transition: background var(--transition), border-color var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(56, 56, 54, 0.1);
}
.kb-form .wpcf7-list-item input[type="radio"] { border-radius: 50%; }
.kb-form .wpcf7-list-item input[type="checkbox"]:checked,
.kb-form .wpcf7-list-item input[type="radio"]:checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
}
.kb-form .wpcf7-list-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 2px;
    width: 7px;
    height: 12px;
    border: solid var(--color-fg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.kb-form .wpcf7-list-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--color-fg);
}

/* CF7 submit */
.kb-form .wpcf7-submit {
    width: 100%;
    padding: 17px 25px;
    border-radius: var(--radius-sm);
    background: var(--color-accent);
    color: var(--color-fg);
    font-weight: 500;
    border: 0;
    cursor: pointer;
    line-height: 1.2;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.kb-form .wpcf7-submit:focus, .kb-form .wpcf7-submit:hover { background: var(--color-accent-dark); }

/* CF7 messages and validation */
.kb-form .wpcf7 form .wpcf7-response-output,
.kb-form .wpcf7-response-output {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--color-line);
    font-size: .9rem;
}
.kb-form .wpcf7 form.sent .wpcf7-response-output {
    border-color: #2e7d32;
    background: rgba(46, 125, 50, .06);
    color: #2e7d32;
}
.kb-form .wpcf7 form.invalid .wpcf7-response-output,
.kb-form .wpcf7 form.unaccepted .wpcf7-response-output {
    border-color: #c62828;
    background: rgba(198, 40, 40, .05);
    color: #c62828;
}
.kb-form .wpcf7-not-valid-tip {
    color: #c62828;
    font-size: .82rem;
    margin-top: 4px;
    display: block;
}
.kb-form .wpcf7-spinner { display: none; }
