/* ormsy-stockist form.
   Deliberately minimal and colour-neutral: it inherits the theme's fonts, button
   styles and colours rather than imposing its own, because this ships to every
   client site. Only layout and spacing are set here. */

.ormsy-stockist-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Textareas, the terms checkbox and the submit button run full width. */
.ormsy-stockist-form .ormsy-field-textarea,
.ormsy-stockist-form .ormsy-field-checkbox,
.ormsy-stockist-form > p:last-child {
    grid-column: 1 / -1;
}

.ormsy-stockist-form .ormsy-field {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.ormsy-stockist-form label {
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: .35rem;
    line-height: 1.3;
}

.ormsy-stockist-form input[type="text"],
.ormsy-stockist-form input[type="email"],
.ormsy-stockist-form input[type="tel"],
.ormsy-stockist-form select,
.ormsy-stockist-form textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid currentColor;
    border-color: rgba(128, 128, 128, .45);
    border-radius: 3px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.4;
}

.ormsy-stockist-form textarea { resize: vertical; min-height: 5.5rem; }

.ormsy-stockist-form input:focus,
.ormsy-stockist-form select:focus,
.ormsy-stockist-form textarea:focus {
    outline: 2px solid rgba(128, 128, 128, .6);
    outline-offset: 1px;
}

/* The checkbox is the one field where the control sits before the label text. */
.ormsy-stockist-form .ormsy-field-checkbox label {
    flex-direction: row;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-weight: 400;
    font-size: 1rem;
}
.ormsy-stockist-form .ormsy-field-checkbox input { margin-top: .2rem; flex: none; }

.ormsy-stockist-form .req { color: #c0392b; }

/* Never show the honeypot, whatever the theme does to absolutely-positioned text. */
.ormsy-stockist-form .ormsy-hp { display: none !important; }

.ormsy-stockist-form .ormsy-submit { margin-top: .5rem; }

.ormsy-stockist-done,
.ormsy-stockist-error {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 3px;
    border-left: 4px solid;
}
.ormsy-stockist-done  { border-color: #2e7d32; background: rgba(46, 125, 50, .08); }
.ormsy-stockist-error { border-color: #c0392b; background: rgba(192, 57, 43, .08); }
.ormsy-stockist-done h3 { margin-top: 0; }
.ormsy-stockist-done p:last-child,
.ormsy-stockist-error p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
    .ormsy-stockist-form { grid-template-columns: minmax(0, 1fr); }
}
