/* ==========================================================================
   Testimonial Frontend Form — testimonial-form.css
   Scoped to .tff-* classes so it cannot leak into the rest of the theme.
   ========================================================================== */

/* ---- Wrapper ------------------------------------------------------------ */
.tff-form {
    max-width: 640px;
    margin: 0 auto;
    font-family: inherit;
}

/* ---- Field rows --------------------------------------------------------- */
.tff-field {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tff-field label {
    font-weight: 600;
    font-size: 0.925rem;
}

.tff-required {
    color: #c0392b;
    margin-left: 2px;
}

/* ---- Text inputs & textarea --------------------------------------------- */
.tff-form input[type="text"],
.tff-form textarea,
.tff-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tff-form input[type="text"]:focus,
.tff-form textarea:focus,
.tff-form select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

.tff-form textarea {
    resize: vertical;
    min-height: 130px;
}

/* ---- Star rating -------------------------------------------------------- */
.tff-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}

/* Hide radio inputs visually but keep them accessible */
.tff-stars input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tff-stars label {
    font-size: 2rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.1s ease;
    line-height: 1;
    font-weight: normal; /* override field label bold */
}

/* Colour stars that are checked or hovered (CSS-only, RTL trick) */
.tff-stars input[type="radio"]:checked ~ label,
.tff-stars label:hover,
.tff-stars label:hover ~ label {
    color: #f5a623;
}

/* ---- Service Type checkboxes ------------------------------------------- */
.tff-checkboxes {
    border: none;
    margin: 0;
    padding: 0;
}

.tff-checkboxes legend {
    font-weight: 600;
    font-size: 0.925rem;
    margin-bottom: 0.3rem;
    padding: 0;
}

.tff-field-hint {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    color: #666;
}

.tff-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal;
    font-size: 0.975rem;
    transition: background 0.1s ease;
}

.tff-checkbox-label:hover {
    background: #f4f8fb;
}

.tff-checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #0073aa;
    cursor: pointer;
    flex-shrink: 0;
}

/* ---- Submit button ------------------------------------------------------ */
.tff-field--submit {
    margin-top: 0.5rem;
}

.tff-btn {
    display: inline-block;
    padding: 0.65rem 1.6rem;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tff-btn:hover,
.tff-btn:focus {
    background: #005a87;
    outline: none;
}

.tff-btn:active {
    background: #004a70;
}

/* ---- Notice banners ---------------------------------------------------- */
.tff-notice {
    padding: 0.9rem 1.1rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.tff-notice--success {
    background: #edfbf0;
    border: 1px solid #27ae60;
    color: #1a6e3c;
}

.tff-notice--error {
    background: #fdf3f2;
    border: 1px solid #c0392b;
    color: #8b1e14;
}

/* ---- Honeypot (must stay visually hidden) ------------------------------- */
.tff-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---- Responsive -------------------------------------------------------- */
@media ( max-width: 480px ) {
    .tff-btn {
        width: 100%;
        text-align: center;
    }
}