/* Seobaz Haber 3.4: native comment fields and page layout. */
.thi-contact {
    --thi-accent: rgb(var(--color1, 215 5 15));
    --thi-ink: var(--sb-ink, rgb(var(--title-color, 38 38 38)));
    --thi-muted: var(--sb-mute, #6b7280);
    --thi-border: var(--sb-border, #dfe2e7);
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 24px;
    border: 0;
    border-radius: var(--sb-r, 6px);
    background: #fff;
    box-shadow: var(--sb-shadow, 0 1px 3px rgba(20, 22, 28, .06));
    color: var(--thi-ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0;
}
.thi-contact, .thi-contact * { box-sizing: border-box; }
/* page.php already supplies the white card, title and content padding. */
.news-detail-content .thi-contact {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.thi-contact .thi-heading { margin: 0 0 24px; }
.thi-contact .thi-heading p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--sb-ink-2, #4b5160);
}
.thi-contact .thi-form { margin: 0; }
.thi-contact .thi-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px 24px;
}
.thi-contact .thi-wide { grid-column: 1 / -1; }
.thi-contact .thi-form label {
    display: block;
    min-width: 0;
    margin: 0;
    color: var(--thi-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.thi-contact .thi-grid label > span { color: var(--thi-accent); }
.thi-contact .thi-form small { font-size: inherit; font-weight: 400; }
.thi-contact .thi-form input:not([type=checkbox]):not([type=hidden]),
.thi-contact .thi-form select,
.thi-contact .thi-form textarea {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 44px;
    margin: 6px 0 0;
    padding: 0 14px;
    border: 1px solid var(--thi-border);
    border-radius: 4px;
    outline: none;
    background-color: #fff;
    color: var(--thi-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.thi-contact .thi-form select { appearance: auto; padding-right: 28px; }
.thi-contact .thi-form textarea {
    height: auto;
    min-height: 164px;
    padding: 12px 14px;
    resize: vertical;
}
.thi-contact .thi-form input::placeholder,
.thi-contact .thi-form textarea::placeholder { color: var(--thi-muted); opacity: 1; }
.thi-contact .thi-form input:not([type=checkbox]):focus,
.thi-contact .thi-form select:focus,
.thi-contact .thi-form textarea:focus {
    border-color: var(--thi-accent);
    box-shadow: 0 0 0 3px rgb(var(--color1, 215 5 15) / .12);
}
.thi-contact .thi-form :is(button, a, input[type=checkbox]):focus-visible {
    outline: 2px solid var(--thi-accent);
    outline-offset: 3px;
}
.thi-contact .thi-consents {
    margin: 24px 0;
    padding-top: 20px;
    border-top: 1px solid var(--sb-line, #eef0f3);
}
.thi-contact .thi-consents p {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.7;
}
.thi-contact .thi-consents a {
    color: var(--thi-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgb(var(--color1, 215 5 15) / .5);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.thi-contact .thi-consents a:hover { color: var(--thi-accent); }
.thi-contact .thi-form .thi-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--sb-ink-2, #4b5160);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.7;
    cursor: pointer;
}
.thi-contact .thi-check input[type=checkbox] {
    appearance: auto;
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    padding: 0;
    accent-color: var(--thi-accent);
    cursor: pointer;
}
.thi-contact .thi-check strong {
    display: block;
    margin-bottom: 4px;
    color: var(--thi-ink);
    font-size: 13px;
    font-weight: 600;
}
.thi-contact .thi-consents .thi-muted { margin: 0; color: var(--thi-muted); font-size: 12px; }
.thi-contact .thi-terms { margin: 0 0 18px; font-size: 13px; }
.thi-contact .thi-terms summary { color: var(--thi-ink); font-weight: 600; cursor: pointer; }
.thi-contact .thi-terms summary:focus-visible { outline: 2px solid var(--thi-accent); outline-offset: 3px; }
.thi-contact .thi-terms-text { margin-top: 12px; padding: 14px; background: var(--sb-soft, #f3f4f6); border: 1px solid var(--thi-border); border-radius: 4px; color: var(--sb-ink-2, #4b5160); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.thi-contact .thi-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--sb-line, #eef0f3);
}
.thi-contact .thi-captcha { max-width: 290px; min-width: 0; }
.thi-contact .thi-question { color: var(--thi-ink); font-variant-numeric: tabular-nums; }
.thi-contact .thi-captcha-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.thi-contact .thi-captcha-row input { width: 100px !important; margin-top: 0 !important; }
.thi-contact .thi-form button {
    font-family: inherit;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    box-shadow: none;
}
.thi-contact .thi-form .thi-refresh {
    min-height: 40px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--thi-accent);
    font-size: 12px;
    font-weight: 600;
}
.thi-contact .thi-form .thi-refresh:hover { background: var(--sb-soft, #f3f4f6); }
.thi-contact .thi-form .thi-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: auto;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 4px;
    background: var(--thi-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    transition: opacity .15s ease;
}
.thi-contact .thi-form .thi-send:hover { opacity: .9; }
.thi-contact .thi-form button:disabled { opacity: .55; cursor: wait; }
.thi-contact .thi-status {
    margin: 18px 0 0;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.thi-contact .thi-status:empty { display: none; }
.thi-contact .thi-status[data-type=success] {
    padding: 12px 14px;
    border: 1px solid #cce4d5;
    border-radius: 4px;
    background: #f0f8f3;
    color: #176438;
}
.thi-contact .thi-status[data-type=error] {
    padding: 12px 14px;
    border: 1px solid rgb(var(--color1, 215 5 15) / .2);
    border-radius: 4px;
    background: rgb(var(--color1, 215 5 15) / .05);
    color: var(--thi-ink);
}
.thi-contact .thi-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
@media (max-width: 767px) {
    .thi-contact { padding: 18px; }
    .news-detail-content .thi-contact { padding: 0; }
    .thi-contact .thi-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .thi-contact .thi-bottom { flex-direction: column; align-items: stretch; gap: 18px; }
    .thi-contact .thi-captcha { max-width: 100%; }
    .thi-contact .thi-form .thi-send { width: 100%; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .thi-contact .thi-form input, .thi-contact .thi-form textarea,
    .thi-contact .thi-form select, .thi-contact .thi-form button { transition: none; }
}
