/* ========== Form Options Modal ========== */

#griffinforms-builder-modal-formoptions .modal-body {
    padding: 0;
    overflow: hidden;
}

/* Layout: sidebar + content side-by-side */
#griffinforms-builder-modal-formoptions .gf-formoptions-layout {
    display: flex;
    height: 540px;
}

/* ── Left sidebar nav ─────────────────────────────────────────────────────── */

#griffinforms-builder-modal-formoptions .gf-formoptions-sidenav {
    width: 172px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 8px;
    overflow-y: auto;
}

/* Glide indicator — sits behind buttons, animates to active position */
#griffinforms-builder-modal-formoptions .gf-formoptions-tab-indicator {
    position: absolute;
    left: 8px;
    right: 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--gf-color-primary, #6f2cf2) 10%, transparent);
    pointer-events: none;
    transition: top 220ms cubic-bezier(0.4, 0, 0.2, 1),
                height 220ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

/* Tab buttons */
#griffinforms-builder-modal-formoptions .gf-formoptions-tab-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    color: var(--gf-color-text, #333);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 160ms ease;
}

#griffinforms-builder-modal-formoptions .gf-formoptions-tab-btn:hover {
    color: var(--gf-color-primary, #6f2cf2);
}

#griffinforms-builder-modal-formoptions .gf-formoptions-tab-btn--active {
    color: var(--gf-color-primary, #6f2cf2);
    font-weight: 400; /* no weight shift */
}

/* Chevron icon */
#griffinforms-builder-modal-formoptions .gf-formoptions-tab-chevron {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: opacity 160ms ease;
    color: var(--gf-color-primary, #6f2cf2);
}

#griffinforms-builder-modal-formoptions .gf-formoptions-tab-btn--active .gf-formoptions-tab-chevron {
    opacity: 1;
}

/* Error dot */
#griffinforms-builder-modal-formoptions .gf-formoptions-tab-error-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gf-color-danger, #d14343);
    margin-left: 5px;
    flex-shrink: 0;
}

#griffinforms-builder-modal-formoptions .gf-formoptions-tab-btn-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#griffinforms-builder-modal-formoptions .gf-tab-has-error {
    color: var(--gf-color-danger, #d14343) !important;
}

/* ── Right content area ───────────────────────────────────────────────────── */

#griffinforms-builder-modal-formoptions .gf-formoptions-content {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
    border-left: none;
}

/* Individual panels — hidden via class, not attribute */
#griffinforms-builder-modal-formoptions .gf-formoptions-panel {
    display: none;
}

#griffinforms-builder-modal-formoptions .gf-formoptions-panel.gf-formoptions-panel--active {
    display: block;
}

#griffinforms-builder-modal-formoptions .gf-formoptions-panel-body {
    padding: 28px 32px;
}

/* ── Option rows ──────────────────────────────────────────────────────────── */

#griffinforms-builder-modal-formoptions .gf-formoptions-row {
    align-items: flex-start;
}

#griffinforms-builder-modal-formoptions .gf-formoptions-row label.form-label {
    padding-top: 6px;
    color: var(--gf-color-text, #333);
}

/* Folder read-only display */
#griffinforms-builder-modal-formoptions .gf-formoptions-folder-name {
    font-size: 14px;
}

/* Hidden sub-options */
#griffinforms-builder-modal-formoptions .griffinforms-hidden-option {
    display: none;
}

/* ── App FormControl overrides (gf-app-control) ───────────────────────────── */

#griffinforms-builder-modal-formoptions .gf-app-control-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gf-color-text, #333);
    margin-bottom: 4px;
}

#griffinforms-builder-modal-formoptions .gf-app-control-description {
    font-size: 12px;
    color: var(--gf-color-text-light, #888);
    margin-top: 4px;
}

/* ── Radio + checkbox token styling (all controls inside modal) ───────────── */

#griffinforms-builder-modal-formoptions .form-check-input {
    accent-color: var(--gf-color-primary, #6f2cf2);
    flex-shrink: 0;
}

#griffinforms-builder-modal-formoptions .form-check-input[type="radio"] {
    border-color: #adb5bd;
    background-color: #fff;
    box-shadow: none;
}

#griffinforms-builder-modal-formoptions .form-check-input[type="radio"]:checked {
    border-color: var(--gf-color-primary, #6f2cf2);
    background-color: #fff;
    box-shadow: none;
}

#griffinforms-builder-modal-formoptions .form-check-input[type="radio"]:checked::before {
    background-color: var(--gf-color-primary, #6f2cf2);
}

#griffinforms-builder-modal-formoptions .form-check-input[type="checkbox"]:checked {
    background-color: var(--gf-color-primary, #6f2cf2);
    border-color: var(--gf-color-primary, #6f2cf2);
}

/* Builder multiselect selections should use the builder accent token. */
#griffinforms-builder-modal-formoptions .griffinforms-multiselect option:checked {
    background: linear-gradient(0deg, var(--gf-color-primary, #6f2cf2), var(--gf-color-primary, #6f2cf2));
    color: #fff;
}
