/**
 * Form Block Styles
 *
 * @package BragForms
 */

.brag-forms-contact-form {
    max-width: 36rem;
}

.brag-forms-form .brag-forms-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

/* Flex container for responsive field layout */
.brag-forms-fields {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem; /* gap-6 on x-axis only */
    margin-bottom: 0.25rem;
}

.brag-forms-field {
    flex: 1 1 var(--brag-field-1-width, 100%);
    min-width: 0; /* Prevents flex overflow */
}

.brag-forms-field--1 {
    flex-basis: var(--brag-field-1-width, 100%);
}

.brag-forms-field--2 {
    flex-basis: var(--brag-field-2-width, 100%);
}

.brag-forms-field--3 {
    flex-basis: var(--brag-field-3-width, 100%);
}

.brag-forms-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    font-size: var(--brag-font-size, 1rem);
}

.brag-forms-required {
    color: #ef4444;
}

.brag-forms-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: var(--brag-font-size, 1rem);
    line-height: 1.5;
    border: none !important;
    border-radius: 0.5rem;
    /* background-color set via inline style from ACF for reliability */
    color: #1f2937;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brag-forms-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.brag-forms-input::placeholder {
    color: #9ca3af;
}

.brag-forms-submit {
    margin-top: 1.5rem;
    text-align: center;
}

/* Green button style (matches "Book a strategy call") – outer: dashed border + gap */
.brag-forms-button {
    display: inline-block;
    padding: 0.625rem;
    font-size: var(--brag-font-size, 1rem);
    font-family: var(--wp--preset--font-family--expanded);
    font-weight: 700;
    color: #000;
    background-color: transparent;
    border: 1px dashed #D0D1CD;
    border-radius: 5rem;
    cursor: pointer;
    transition: filter 0.15s ease;
}

/* Inner div: lime pill with padding (creates space between border and fill) */
.brag-forms-button > div {
    display: block;
    padding: 0.75rem 1.5rem;
    background-color: #CFFF20;
    border-radius: 5rem;
    transition: background-color 0.15s ease;
}

.brag-forms-button:hover > div {
    background-color: #b8e61c;
}

.brag-forms-button:hover {
    filter: brightness(1.05);
}

.brag-forms-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(207, 255, 32, 0.5);
}

/* Stack fields full-width on small screens */
@media (max-width: 640px) {
    .brag-forms-fields {
        flex-direction: column;
    }

    .brag-forms-field,
    .brag-forms-field--1,
    .brag-forms-field--2,
    .brag-forms-field--3 {
        flex-basis: 100%;
    }
}
