/*
 * Contact page: "I'm interested in" chips + "Request a Quote" form.
 * Interactive states (focus, filled, invalid, progress, sending, sent) are
 * driven by assets/js/contact-form.js. Everything is scoped to .ks-cf so the
 * template's main.css rules for other pages stay untouched.
 */

.ks-cf {
    --cf-ink: #111013;
    --cf-ink-2: #2e2d33;
    --cf-muted: #6b6977;
    --cf-line: rgba(17, 16, 19, 0.1);
    --cf-rule: rgba(17, 16, 19, 0.18);
    --cf-placeholder: #75737d;
    --cf-violet: #6d46e8;
    --cf-success: #13795b;
    --cf-danger: #c0322a;
    --cf-danger-soft: rgba(192, 50, 42, 0.08);
    /* The site's amber (--tp-common-yellow) marks the one action. */
    --cf-accent: #ffc446;
    --cf-ease: cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------------ chips */
.ks-cf-chips .tp-contact-category-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border: 1px solid var(--cf-line);
    border-radius: 999px;
    background: #fff;
    color: var(--cf-ink-2);
    font-size: 16px;
    font-weight: 500;
    user-select: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s var(--cf-ease), box-shadow 0.3s var(--cf-ease);
}

.ks-cf-chips .tp-contact-category-btn::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    opacity: 0.35;
    transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ks-cf-chips .tp-contact-category-btn:hover {
    border-color: var(--cf-ink);
    transform: translateY(-1px);
}

.ks-cf-chips .tp-contact-category-btn:focus-visible {
    outline: 2px solid var(--cf-violet);
    outline-offset: 3px;
}

.ks-cf-chips .tp-contact-category-btn[aria-pressed="true"] {
    border-color: transparent;
    background: var(--cf-ink);
    color: #fff;
    box-shadow: 0 10px 24px -14px rgba(17, 16, 19, 0.7);
}

.ks-cf-chips .tp-contact-category-btn[aria-pressed="true"]::before {
    border-color: transparent;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111013' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat;
    opacity: 1;
}

.ks-cf-chips-hint {
    margin: 4px 0 0;
    color: var(--cf-muted);
    font-size: 14px;
}

/* ------------------------------------------------------------------ sheet
 * A ruled brief sheet on the page rather than a floating card: an ink rule
 * opens it, fields are bare lines with large type, one ink button closes it.
 * Colour is kept for meaning (focus, error, success); amber marks sending.
 */
.ks-cf-card {
    position: relative;
    padding: 44px 0 0;
    border: 0;
    border-top: 1.5px solid var(--cf-ink);
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.ks-cf-card .row {
    --bs-gutter-x: 56px;
}

.ks-cf ::selection {
    background: var(--cf-accent);
    color: var(--cf-ink);
}

/* ----------------------------------------------------------------- fields */
.ks-cf .ks-cf-card .tp-contact-form-input {
    position: relative;
}

.ks-cf .ks-cf-card .tp-contact-form-input.mb-20 {
    margin-bottom: 44px;
}

.ks-cf .ks-cf-card .tp-contact-form-input label {
    display: block;
    margin-bottom: 6px;
    color: var(--cf-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.ks-cf .ks-cf-card .tp-contact-form-input.is-focused label {
    color: var(--cf-ink);
}

.ks-cf .ks-cf-card .tp-contact-form-input input,
.ks-cf .ks-cf-card .tp-contact-form-input textarea {
    display: block;
    width: 100%;
    height: auto;
    padding: 8px 34px 14px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--cf-rule);
    color: var(--cf-ink);
    caret-color: var(--cf-violet);
    font-family: inherit;
    font-size: clamp(19px, 1.5vw, 23px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.01em;
    transition: box-shadow 0.3s var(--cf-ease);
}

.ks-cf .ks-cf-card .tp-contact-form-input textarea {
    min-height: 132px;
    resize: none;
}

.ks-cf .ks-cf-card .tp-contact-form-input input::placeholder,
.ks-cf .ks-cf-card .tp-contact-form-input textarea::placeholder {
    color: var(--cf-placeholder);
    font-size: inherit;
    font-weight: 400;
    opacity: 1;
}

.ks-cf .ks-cf-card .tp-contact-form-input input:hover,
.ks-cf .ks-cf-card .tp-contact-form-input textarea:hover {
    box-shadow: inset 0 -1px 0 rgba(17, 16, 19, 0.5);
}

.ks-cf .ks-cf-card .tp-contact-form-input input:focus,
.ks-cf .ks-cf-card .tp-contact-form-input textarea:focus {
    outline: none;
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--cf-ink);
}

.ks-cf-field {
    position: relative;
}

/* Valid mark: a drawn check at the end of the line. */
.ks-cf-tick {
    position: absolute;
    right: 0;
    bottom: 16px;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313795b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 20px no-repeat;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.35s var(--cf-ease);
    pointer-events: none;
}

.ks-cf-areawrap .ks-cf-tick {
    top: 12px;
    bottom: auto;
}

.ks-cf .ks-cf-card .tp-contact-form-input.is-valid .ks-cf-tick {
    opacity: 1;
    transform: scale(1);
}

.ks-cf .ks-cf-card .tp-contact-form-input.is-invalid input,
.ks-cf .ks-cf-card .tp-contact-form-input.is-invalid textarea {
    box-shadow: inset 0 -2px 0 var(--cf-danger);
}

.ks-cf .ks-cf-card .tp-contact-form-input.is-invalid label {
    color: var(--cf-danger);
}

.ks-cf-error {
    max-height: 0;
    margin: 0;
    overflow: hidden;
    color: var(--cf-danger);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: max-height 0.3s var(--cf-ease), margin 0.3s var(--cf-ease);
}

.ks-cf .ks-cf-card .tp-contact-form-input.is-invalid .ks-cf-error {
    max-height: 60px;
    margin-top: 10px;
}

.ks-cf .ks-cf-card .tp-contact-form-input.is-textarea .ks-cf-error {
    padding-right: 110px;
}

.ks-cf-areawrap {
    position: relative;
}

.ks-cf-counter {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    color: var(--cf-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

.ks-cf-counter.is-short {
    color: var(--cf-ink-2);
}

.ks-cf-counter.is-ok {
    color: var(--cf-success);
}

/* --------------------------------------------------------------- security */
.ks-cf-security {
    margin: -8px 0 36px;
}

.ks-cf-security-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--cf-muted);
    font-size: 14px;
    font-weight: 500;
}

.ks-cf-security-label svg {
    flex: none;
    width: 16px;
    height: 16px;
}

.ks-cf-security.is-verified .ks-cf-security-label {
    color: var(--cf-success);
}

/* ----------------------------------------------------------------- footer */
.ks-cf .ks-cf-card .tp-contact-form-btn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 32px;
    padding-top: 28px;
    border-top: 1px solid var(--cf-line);
}

/* What is left, in words, beside the button (no progress bar). */
.ks-cf-progress {
    flex: 1 1 260px;
    margin: 0;
}

.ks-cf-progress-track {
    display: none;
}

.ks-cf-progress-text {
    color: var(--cf-muted);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

.ks-cf-progress.is-complete .ks-cf-progress-text {
    color: var(--cf-ink);
    font-weight: 500;
}

.ks-cf .ks-cf-card .tp-contact-form-btn button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-width: 248px;
    height: 64px;
    padding: 0 10px 0 30px;
    border: 0;
    border-radius: 999px;
    background: #e9e8ee;
    color: var(--cf-ink-2);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.35s var(--cf-ease), color 0.35s var(--cf-ease), transform 0.2s var(--cf-ease);
}

.ks-cf .ks-cf-card .tp-contact-form-btn button span {
    overflow: visible;
}

.ks-cf .ks-cf-card .tp-contact-form-btn button .ks-cf-arrow {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 12px;
    border-radius: 50%;
    background: #fff;
    color: var(--cf-ink);
    transition: background-color 0.35s var(--cf-ease), transform 0.35s var(--cf-ease);
}

.ks-cf .ks-cf-card .tp-contact-form-btn button.is-ready {
    background: var(--cf-ink);
    color: #fff;
}

.ks-cf .ks-cf-card .tp-contact-form-btn button.is-ready .ks-cf-arrow {
    background: var(--cf-accent);
}

.ks-cf .ks-cf-card .tp-contact-form-btn button.is-ready:hover .ks-cf-arrow {
    transform: translateX(4px);
}

.ks-cf .ks-cf-card .tp-contact-form-btn button:active {
    transform: scale(0.985);
}

.ks-cf .ks-cf-card .tp-contact-form-btn button:focus-visible {
    outline: 2px solid var(--cf-violet);
    outline-offset: 4px;
}

.ks-cf .ks-cf-card .tp-contact-form-btn button .ks-cf-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ks-cf-spin 0.8s linear infinite;
}

.ks-cf .ks-cf-card .tp-contact-form-btn button.is-loading {
    pointer-events: none;
}

.ks-cf .ks-cf-card .tp-contact-form-btn button.is-loading .ks-cf-spinner {
    display: inline-block;
}

.ks-cf .ks-cf-card .tp-contact-form-btn button.is-loading .ks-cf-arrow {
    display: none;
}

@keyframes ks-cf-spin {
    to {
        transform: rotate(360deg);
    }
}

.ks-cf-alert {
    display: none;
    flex-basis: 100%;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--cf-danger-soft);
    color: var(--cf-danger);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
}

.ks-cf-alert.is-visible {
    display: flex;
}

.ks-cf-alert svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

/* ----------------------------------------------------------------- result */
.ks-cf-result {
    padding: 8px 0 12px;
    animation: ks-cf-rise 0.6s var(--cf-ease) both;
}

.ks-cf-result:focus {
    outline: none;
}

.ks-cf-result-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 28px;
    border-radius: 50%;
    background: var(--cf-accent);
    color: var(--cf-ink);
}

.ks-cf-result-icon.is-whatsapp {
    background: #25d366;
    color: #fff;
}

.ks-cf-result-icon svg {
    width: 30px;
    height: 30px;
}

.ks-cf-result-icon .ks-cf-check-path {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: ks-cf-draw 0.5s 0.25s var(--cf-ease) forwards;
}

.ks-cf-result h4 {
    margin: 0 0 12px;
    color: var(--cf-ink);
    font-family: 'Teko', sans-serif;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.ks-cf-result p {
    max-width: 52ch;
    margin: 0 0 32px;
    color: var(--cf-ink-2);
    font-size: 18px;
    line-height: 1.55;
}

.ks-cf-result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
    padding-top: 28px;
    border-top: 1px solid var(--cf-line);
}

.ks-cf-result-actions a.is-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 28px;
    border-radius: 999px;
    background: var(--cf-ink);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.ks-cf-result-actions button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--cf-ink);
    font-size: 16px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
    cursor: pointer;
}

.ks-cf-result-actions button:hover {
    text-decoration-color: var(--cf-accent);
}

.ks-cf-result-actions button:focus-visible,
.ks-cf-result-actions a.is-primary:focus-visible {
    outline: 2px solid var(--cf-violet);
    outline-offset: 4px;
}

@keyframes ks-cf-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

@keyframes ks-cf-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 991.98px) {
    .ks-cf-card .row {
        --bs-gutter-x: 24px;
    }
}

@media (max-width: 575.98px) {
    .ks-cf-card {
        padding-top: 32px;
    }

    .ks-cf .ks-cf-card .tp-contact-form-input.mb-20 {
        margin-bottom: 36px;
    }

    .ks-cf-chips .tp-contact-category-btn {
        padding: 12px 18px;
        font-size: 15px;
    }

    .ks-cf .ks-cf-card .tp-contact-form-btn button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ks-cf *,
    .ks-cf *::before,
    .ks-cf *::after,
    .ks-cf-chips .tp-contact-category-btn {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .ks-cf-result-icon .ks-cf-check-path {
        stroke-dashoffset: 0;
    }
}
