:root {
    --tf-contact-bg: #f8f6f3;
    --tf-contact-surface: #ffffff;
    --tf-contact-text: #1f2a37;
    --tf-contact-muted: #5f6c7b;
    --tf-contact-primary: #e87511;
    --tf-contact-primary-soft: #fdf0e3;
    --tf-contact-primary-hover: #d2650d;
    --tf-contact-border: #e3e0da;
    --tf-contact-danger: #b42318;
    --tf-contact-danger-soft: #fdecec;
    --tf-contact-success: #067647;
    --tf-contact-success-soft: #e8f8ef;
    --tf-contact-radius: 16px;
    --tf-contact-shadow: 0 14px 32px rgba(31, 42, 55, 0.08);
}

.tf-contact {
    background:
        radial-gradient(circle at 14% 5%, rgba(232, 117, 17, 0.10) 0, rgba(232, 117, 17, 0.02) 38%, transparent 60%),
        linear-gradient(180deg, #fffdf9 0%, var(--tf-contact-bg) 75%);
    border: 1px solid var(--tf-contact-border);
    border-radius: var(--tf-contact-radius);
    box-shadow: var(--tf-contact-shadow);
    color: var(--tf-contact-text);
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    margin: 0 auto;
    max-width: 640px;
    padding: 16px;
}

.tf-contact,
.tf-contact * {
    box-sizing: border-box;
}

/* Isolacja przed agresywnymi stylami motywu (przyciski, typografia). */
.tf-contact button,
.tf-contact [type="button"],
.tf-contact [type="submit"] {
    font-family: inherit;
    letter-spacing: normal;
    line-height: 1.2;
    text-transform: none;
}

.tf-contact input,
.tf-contact textarea,
.tf-contact select {
    font-family: inherit;
}

.tf-contact__hero {
    border-bottom: 1px solid var(--tf-contact-border);
    margin-bottom: 18px;
    padding: 6px 6px 16px;
    text-align: center;
}

.tf-contact__title {
    color: var(--tf-contact-text);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 6px;
}

.tf-contact__subtitle {
    color: var(--tf-contact-muted);
    font-size: 15px;
    margin: 0;
}

.tf-contact__form {
    display: block;
    padding: 0 6px;
}

.tf-contact__field {
    margin-bottom: 16px;
}

.tf-contact__field label {
    color: var(--tf-contact-text);
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tf-contact__req {
    color: var(--tf-contact-danger);
    font-weight: 700;
}

.tf-contact__field input[type="text"],
.tf-contact__field input[type="email"],
.tf-contact__field input[type="tel"],
.tf-contact__field textarea {
    background: var(--tf-contact-surface);
    border: 1px solid var(--tf-contact-border);
    border-radius: 10px;
    color: var(--tf-contact-text);
    font-size: 15px;
    outline: none;
    padding: 11px 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.tf-contact__field input::placeholder,
.tf-contact__field textarea::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.tf-contact__field input:focus,
.tf-contact__field textarea:focus {
    border-color: var(--tf-contact-primary);
    box-shadow: 0 0 0 3px var(--tf-contact-primary-soft);
}

.tf-contact__field textarea {
    min-height: 130px;
    resize: vertical;
}

.tf-contact__input-invalid {
    border-color: var(--tf-contact-danger) !important;
}

.tf-contact__field-error {
    color: var(--tf-contact-danger);
    font-size: 13px;
    margin-top: 6px;
}

.tf-contact__consent .tf-contact__checkbox {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    margin: 0;
}

.tf-contact__consent input[type="checkbox"] {
    accent-color: var(--tf-contact-primary);
    flex: 0 0 auto;
    height: 18px;
    margin: 2px 0 0;
    width: 18px;
}

.tf-contact__consent span {
    color: var(--tf-contact-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.tf-contact__consent a {
    color: var(--tf-contact-primary);
    font-weight: 600;
    text-decoration: underline;
}

.tf-contact__error--global {
    background: var(--tf-contact-danger-soft);
    border: 1px solid #f3c1bd;
    border-radius: 10px;
    color: var(--tf-contact-danger);
    font-size: 14px;
    margin-bottom: 14px;
    padding: 11px 13px;
}

.tf-contact__success {
    background: var(--tf-contact-success-soft);
    border: 1px solid #b5e3cd;
    border-radius: 10px;
    color: var(--tf-contact-success);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.tf-contact__submit {
    background: var(--tf-contact-primary);
    border: 1px solid var(--tf-contact-primary);
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    display: block;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 20px;
    transition: background 0.15s ease, transform 0.05s ease;
    width: 100%;
}

.tf-contact__submit:hover {
    background: var(--tf-contact-primary-hover);
}

.tf-contact__submit:active {
    transform: translateY(1px);
}

.tf-contact__submit:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.tf-contact__noscript {
    background: var(--tf-contact-danger-soft);
    border-radius: 10px;
    color: var(--tf-contact-danger);
    font-size: 14px;
    margin-top: 14px;
    padding: 11px 13px;
    text-align: center;
}

/* Honeypot – niewidoczny dla ludzi (ale widoczny w DOM dla botów). */
.tf-contact__hp {
    height: 0;
    left: -9999px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    top: -9999px;
    width: 0;
    z-index: -1;
}

@media (max-width: 480px) {
    .tf-contact__title {
        font-size: 22px;
    }
}
