/* Graftivo Testimonials — Public submission form styles
   Prefix: graftivo-tform-*
   Diseño consistente con graftivo-forms/assets/form.css
   Usa variables del tema (:root en blocksy-child/style.css) donde es posible.
*/

.graftivo-tform-wrapper {
    max-width: 600px;
}

.graftivo-tform {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Honeypot: fuera de pantalla, invisible para humanos */
.graftivo-tform-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Field group */
.graftivo-tform-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.graftivo-tform-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary, #1b2d5c);
}

.graftivo-tform-field .req {
    color: #d63638;
}

/* Inputs, select, textarea */
.graftivo-tform-field input[type="text"],
.graftivo-tform-field select,
.graftivo-tform-field textarea {
    font-size: 16px; /* Mínimo 16px: evita auto-zoom de iOS al enfocar */
    padding: 12px 14px;
    border: 1px solid var(--color-border, rgba(0, 0, 0, 0.15));
    border-radius: 8px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--color-text, #1b2d5c);
    transition: border-color 0.15s ease;
}

.graftivo-tform-field select {
    /* height: auto cancela el height:40px fijo que Blocksy aplica a todo select —
       sin esto el texto de 16px queda recortado a ~14px de espacio y se ve como guiones */
    height: auto;
    padding-right: 40px !important;
    /* appearance:none quita la flecha nativa (que se dibuja encima del texto con el
       padding-right de arriba) — se reemplaza por una flecha SVG propia. Sin esto,
       el texto choca con la flecha nativa del navegador. */
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    /* Sin esto, el line-height heredado (más alto que la caja del select una vez
       quitada la apariencia nativa) hace que el texto se renderice más arriba de
       lo que cabe y se vea con la mitad de arriba recortada. */
    line-height: 1.2 !important;
}

.graftivo-tform-field input:focus,
.graftivo-tform-field select:focus,
.graftivo-tform-field textarea:focus {
    outline: none;
    border-color: var(--color-tertiary, #2f8f83);
}

.graftivo-tform-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Submit button */
.graftivo-tform-submit {
    align-self: flex-start;
    background: var(--color-primary, #1b2d5c);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.graftivo-tform-submit:hover {
    opacity: 0.88;
}

.graftivo-tform-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error box */
.graftivo-tform-error {
    background: #fde8e8;
    color: #9a1c1c;
    border: 1px solid #f5b5b5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
}

/* Success message */
.graftivo-tform-success {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-primary, #1b2d5c);
    padding: 20px;
    background: #f0faf8;
    border: 1px solid var(--color-tertiary, #2f8f83);
    border-radius: 8px;
}

@media (max-width: 480px) {
    .graftivo-tform-submit {
        width: 100%;
    }
}
