/* roosterx — global Gravity Forms styling.
 *
 * Applies to every Gravity form across the site. Mirrors the
 * pro-register card on /epaggelmaties-spoudastes:
 *   - subtle bg card, 12px radius, generous padding
 *   - inputs: 10px padding, 1px #ddd border, 6px radius
 *   - radios + checkboxes: flex-aligned with their labels
 *     (Gravity emits a stray <br> between input and label that breaks
 *     alignment — we hide it and use flex)
 *   - submit: pill, full-width, dark fill
 *
 * Wrapper card is opt-out via .gform_wrapper.is-bare on installs that
 * embed Gravity inside another card.
 */

.gform_wrapper:not(.is-bare) {
    background-color: var(--wp--preset--color--subtle, #f7f7f7);
    border-radius: 12px;
    padding: clamp(20px, 3vw, 32px);
}

.gform_heading {
    margin-bottom: 1.5rem;
}
.gform_title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    line-height: 1.2;
}
.gform_description {
    color: var(--wp--preset--color--contrast-2, #555);
    font-size: 0.95rem;
    line-height: 1.5;
}

.gform_wrapper .gform_fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.gform_wrapper .gfield {
    width: 100%;
}

.gform_wrapper .gfield_label,
.gform_wrapper .gform-field-label--type-sub {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--wp--preset--color--contrast, #1a1a1a);
}

/* Inputs / textareas / selects — match pro-register: 10px padding,
 * 1px #ddd border, 6px radius, 100% width. */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="password"],
.gform_wrapper input[type="search"],
.gform_wrapper input[type="date"],
.gform_wrapper input[type="time"],
.gform_wrapper textarea,
.gform_wrapper select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--wp--preset--color--contrast, #1a1a1a);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gform_wrapper input:focus,
.gform_wrapper textarea:focus,
.gform_wrapper select:focus {
    border-color: var(--wp--preset--color--contrast, #1a1a1a);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}
.gform_wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

/* Radio + checkbox alignment.
 * Gravity emits each choice as:
 *   <div class="gchoice">
 *     <input type="checkbox" id="..."> <br>
 *     <label for="...">Label text</label>
 *   </div>
 * The <br> forces label onto its own line. We hide it and use flex
 * to render input + label on one row, vertically centred. */
.gform_wrapper .gfield_checkbox,
.gform_wrapper .gfield_radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.gform_wrapper .gchoice {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}
.gform_wrapper .gchoice > br {
    display: none;
}
.gform_wrapper .gfield-choice-input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--wp--preset--color--contrast, #1a1a1a);
    cursor: pointer;
}
.gform_wrapper .gchoice label,
.gform_wrapper .gform-field-label--type-inline {
    margin: 0;
    font-weight: 400;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--wp--preset--color--contrast, #1a1a1a);
}

/* Name + complex fields — first-name / last-name pair side by side. */
.gform_wrapper .ginput_complex {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.gform_wrapper .ginput_complex > p,
.gform_wrapper .ginput_complex > span {
    flex: 1 1 200px;
    margin: 0;
}

/* Width-half pairs in a 2-col grid on desktop. The native gravity-theme
 * CSS does similar but only when its own theme stylesheet loads. */
@media (min-width: 768px) {
    .gform_wrapper .gform_fields {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px 24px;
    }
    .gform_wrapper .gfield--width-full {
        grid-column: 1 / -1;
    }
}

/* Honeypot validation container — keep accessible to bots but invisible
 * to humans. Visually hide off-screen. */
.gform_wrapper .gform_validation_container {
    position: absolute !important;
    left: -9000px !important;
    top: -9000px !important;
}

/* Submit button — pill, full-width, dark fill. */
.gform_wrapper .gform_footer {
    margin-top: 1.5rem;
    padding: 0;
}
.gform_wrapper .gform_button {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--wp--preset--color--contrast, #1a1a1a);
    color: #fff;
    border: 0;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.gform_wrapper .gform_button:hover,
.gform_wrapper .gform_button:focus-visible {
    transform: translateY(-1px);
    opacity: 0.94;
    outline: none;
}

/* Field-level description and validation messages. */
.gform_wrapper .gfield_description {
    font-size: 0.85rem;
    color: var(--wp--preset--color--contrast-2, #555);
    margin-top: 4px;
}
.gform_wrapper .gfield_validation_message,
.gform_wrapper .gform_validation_errors {
    color: #c0392b;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* reCAPTCHA breathing room. */
.gform_wrapper .ginput_recaptcha {
    margin-top: 8px;
}

/* Confirmation message after submission. */
.gform_confirmation_wrapper,
.gform_confirmation_message {
    background-color: var(--wp--preset--color--subtle, #f7f7f7);
    border-radius: 12px;
    padding: clamp(20px, 3vw, 32px);
    color: var(--wp--preset--color--contrast, #1a1a1a);
    line-height: 1.5;
}
