/* ═══════════════════════════════════════════════════════════════════════
   EFBA Pharma (JP) - お問い合わせフォーム (青磁)
   Seladon #3f6e60, hairline #dbe2de, corner 2px, no pill, no glow.
   Mobile: one column; >=1100px: two-column field grid.
   ═══════════════════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-wrap {
    max-width: 880px;
}

.form-privacy {
    margin: 0 0 2rem;
    padding: 1.25rem 1.5rem;
    background: #eef3f0;
    border-left: 3px solid #3f6e60;
    border-radius: 2px;
    color: #3a403d;
}

.form-privacy h3 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    color: #1d211f;
}

.form-privacy p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.85;
}

.form-privacy p + p {
    margin-top: 0.5rem;
}

.jp-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.35rem 1.75rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1d211f;
}

.form-label .req,
.form-check .req {
    margin-left: 0.4rem;
    padding: 0.05rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #3f6e60;
    border-radius: 2px;
    white-space: nowrap;
}

.form-label .opt {
    margin-left: 0.4rem;
    padding: 0.05rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #626b66;
    border: 1px solid #dbe2de;
    border-radius: 2px;
    white-space: nowrap;
}

.form-hint {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: #626b66;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font: inherit;
    font-size: 16px; /* no iOS zoom */
    line-height: 1.6;
    color: #1d211f;
    background: #fff;
    border: 1px solid #b9c5be;
    border-radius: 2px;
    appearance: none;
    -webkit-appearance: none;
}

.form-textarea {
    min-height: 9rem;
    resize: vertical;
}

.form-select {
    padding-right: 2.6rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f6e60' stroke-width='2.2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1.1rem;
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.form-check input:focus-visible,
.form-submit:focus-visible {
    outline: 2px solid #3f6e60;
    outline-offset: 2px;
}

.field-error {
    display: none;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #a4262c;
}

.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea,
.form-consent.has-error {
    border-color: #a4262c;
}

.form-field.has-error .field-error,
.form-consent.has-error .field-error {
    display: block;
}

.form-consent {
    padding: 1rem 1.15rem;
    border: 1px solid #dbe2de;
    border-radius: 2px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #3a403d;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.35rem;
    accent-color: #3f6e60;
    cursor: pointer;
}

.form-check a {
    color: #3f6e60;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-status {
    display: none;
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
    color: #3a403d;
    background: #eef3f0;
    border: 1px solid #dbe2de;
    border-radius: 2px;
}

.form-status.is-visible { display: block; }

.form-status.is-error {
    color: #a4262c;
    background: #fdf1f0;
    border-color: #a4262c;
}

.form-submit {
    display: inline-block;
    min-width: 12rem;
    padding: 0.85rem 2rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #3f6e60;
    border: 1px solid #3f6e60;
    border-radius: 2px;
    cursor: pointer;
}

.form-submit:hover { background: #335a4e; border-color: #335a4e; }
.form-submit:disabled { opacity: 0.65; cursor: wait; }

.form-success {
    padding: 1.5rem 1.75rem;
    background: #eef3f0;
    border-left: 3px solid #3f6e60;
    border-radius: 2px;
    line-height: 1.9;
    color: #1d211f;
}

.form-success[hidden],
.jp-form[hidden] { display: none; }

.form-success p { margin: 0; }
.form-success:focus { outline: 2px solid #3f6e60; outline-offset: 2px; }

.form-ref {
    font-weight: 700;
    letter-spacing: 0.04em;
}

@media (min-width: 1100px) {
    .jp-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .jp-form > .form-status,
    .jp-form > .form-field--wide,
    .jp-form > .form-consent,
    .jp-form > .form-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1099px) {
    .jp-form > .form-field--wide { grid-column: auto; }
}

@media (max-width: 480px) {
    .form-privacy { padding: 1rem 1.1rem; }
    .form-submit { width: 100%; }
}

.form-noscript {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-left: 3px solid #3f6e60;
  background: #eef3f0;
  font-size: 14px;
  line-height: 1.8;
}
