/* Aidantz CMS — Forms Plugin Widget Styles */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght,MONO@0,300..800,1;1,300..800,1&display=swap');

.form-wizard-embed {
    box-sizing: border-box;
    /* font-family: inherit; */
    font-family: "Google Sans Code", monospace;
    color: inherit;
}

.form-wizard-embed *,
.form-wizard-embed *::before,
.form-wizard-embed *::after {
    box-sizing: border-box;
}

/* ── Loading / Error ─────────────────────────────────────────── */

.fw-loading,
.fw-error {
    padding: 2rem 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

.fw-error { color: #dc2626; }

/* ── Wizard container ────────────────────────────────────────── */

.fw-wizard {
    width: 100%;
}

/* Constrain single-column embeds (shortcode inside page content).
   The standalone page overrides this via .fw-standalone-embed. */
.fw-embed-constrained .fw-wizard {
    max-width: 640px;
}

.fw-standalone-header {
    text-align: center;
}
/* ── Step header (multi-step only) ──────────────────────────── */

.fw-step-header {
    text-align: center;
    margin-bottom: 0.4rem;
}

/* ── Progress ────────────────────────────────────────────────── */

.fw-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.fw-progress-bar {
    height: 100%;
    background: #2A4D14;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.fw-step-counter {
    font-size: 0.78rem;
    color: #9ca3af;
    margin: 0.3rem 0 1.2rem;
}

/* ── Step heading ────────────────────────────────────────────── */

.fw-step-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.fw-step-desc {
    color: #6b7280;
    margin: 0 0 1.2rem;
    font-size: 0.95rem;
}

/* ── Fields ──────────────────────────────────────────────────── */

.fw-field {
    margin-bottom: 1.1rem;
}

.fw-label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: #374151;
}

.fw-req {
    color: #dc2626;
    margin-left: 2px;
}

.fw-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 0px;
    background: #fff;
    color: #111827;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.fw-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.fw-input.fw-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.fw-textarea {
    min-height: 100px;
    resize: vertical;
}

.fw-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 1.2em;
    padding-right: 2.4rem;
}

.fw-input.fw-file {
    padding: 0px !important;
}
.fw-file::file-selector-button {
  background: #181b22;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  padding: 10px 10px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  cursor: pointer;
}

.fw-file::file-selector-button:hover {
  background: #0056b3;
}

/* ── Radio / Checkbox groups ─────────────────────────────────── */

.fw-radio-group,
.fw-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fw-radio-label,
.fw-checkbox-label,
.fw-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.92rem;
    cursor: pointer;
    line-height: 1.4;
}

.fw-radio-label input,
.fw-checkbox-label input,
.fw-consent-label input {
    flex-shrink: 0;
    margin-top: 0.15rem;
    width: 16px;
    height: 16px;
    accent-color: #317B22;
    cursor: pointer;
}

/* ── Option icons ────────────────────────────────────────────── */

.fw-opt-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 0px;
}

/* ── Notice / Image ──────────────────────────────────────────── */

.fw-notice {
    padding: 0.75rem 1rem;
    background: #f0f9ff;
    border-left: 3px solid #2563eb;
    border-radius: 0px;
    font-size: 0.9rem;
    color: #1e3a5f;
}

.fw-notice-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0 0.4rem;
}

.fw-notice-body {
    margin: 0.25rem 0 0;
    line-height: 1.5;
}

.fw-notice-list {
    margin: 0.25rem 0 0 1rem;
    padding: 0;
    line-height: 1.6;
}

.fw-notice-title:last-child,
.fw-notice-body:last-child,
.fw-notice-list:last-child { margin-bottom: 0; }

.fw-image {
    max-width: 100%;
    border-radius: 0px;
}

/* ── Field error ─────────────────────────────────────────────── */

.fw-field-error {
    margin-top: 0.3rem;
    font-size: 11px;
    color: #dc2626;
}

/* ── Actions ─────────────────────────────────────────────────── */

.fw-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.fw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.4rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    line-height: 1.4;
}

.fw-btn-primary {
    background: #181b22;
    color: #fff;
}

.fw-btn-primary:hover  { background: #2A4D14; }
.fw-btn-primary:active { background: #2A4D14; }

.fw-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.fw-btn-back {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.fw-btn-back:hover { background: #f9fafb; color: #374151; }

/* ── Messages ────────────────────────────────────────────────── */

.fw-msg {
    margin-top: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.88rem;
}

.fw-msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Success screen ──────────────────────────────────────────── */

.fw-success {
    text-align: center;
    padding: 2.5rem 1rem;
}

.fw-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #d1fae5;
    color: #065f46;
    font-size: 1.8rem;
    line-height: 56px;
    margin: 0 auto 1rem;
}

.fw-success-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.fw-success-msg {
    color: #6b7280;
    margin: 0 0 0.5rem;
}

.fw-redirect-msg {
    color: #9ca3af;
    margin: 0;
}

/* ── Layout: Fields grid ──────────────────────────────────────── */

.fw-fields-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 1rem;
    align-items: start;
}

.fw-col-full           { grid-column: span 12; }
.fw-col-half           { grid-column: span 6;  }
.fw-col-third          { grid-column: span 4;  }
.fw-col-two-thirds     { grid-column: span 8;  }
.fw-col-quarter        { grid-column: span 3;  }
.fw-col-three-quarters { grid-column: span 9;  }

@media (max-width: 480px) {
    .fw-col-half,
    .fw-col-third,
    .fw-col-two-thirds,
    .fw-col-quarter,
    .fw-col-three-quarters { grid-column: span 12; }
}

/* ── Layout: Image sizes ──────────────────────────────────────── */

.fw-image-small  { max-width: 160px; width: 100%; }
.fw-image-medium { max-width: 320px; width: 100%; }
.fw-image-large  { max-width: 520px; width: 100%; }
.fw-image-full   { max-width: 100%;  width: 100%; }

/* ── Layout: Option styles — button strip ────────────────────── */

.fw-opts-button { display: flex; flex-wrap: wrap; gap: .5rem; }

.fw-opt-button {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: .4rem .9rem;
    background: #fff;
    cursor: pointer;
    font-size: .9rem;
    line-height: 1.4;
    transition: border-color .15s, background .15s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.fw-opt-button input[type="radio"],
.fw-opt-button input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.fw-opt-button:hover { border-color: #2A4D14; background: #f8fbff; }
.fw-opt-button.fw-opt-checked { border-color: #2A4D14; background: #eff6ff; color: #1d4ed8; }

/* ── Layout: Option styles — image cards ─────────────────────── */

.fw-opts-card {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: .6rem;
}

.fw-opt-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: .75rem .5rem;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-size: .85rem;
    line-height: 1.4;
    transition: border-color .15s, background .15s, box-shadow .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
}

.fw-opt-card input[type="radio"],
.fw-opt-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.fw-opt-card .fw-opt-icon { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; }
.fw-opt-card:hover { border-color: #93c5fd; background: #f8fbff; }
.fw-opt-card.fw-opt-checked { border-color: #2A4D14; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }


