/*
 * Shared option-row styling for Field Options panels.
 * Used by both regular field options (FieldOptionsPanel) and loop field options
 * (LoopFieldsEditor) so the two editors look and feel the same.
 */

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    background: var(--bs-tertiary-bg);
    transition: all 0.2s ease;
}

.option-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.option-content {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.option-field-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-field-group .form-control {
    flex: 1;
}

.option-default-group {
    flex: 0 0 auto;
    text-align: center;
    min-width: 4rem;
}

.option-default-group .option-default-input {
    width: 1.1rem;
    height: 1.1rem;
    /* Vertically center the checkbox within the height of .form-control-sm
       (~31px) so it sits on the same axis as the Label/Value inputs.
       (form-control-sm height − checkbox height) / 2 ≈ 7px. */
    margin: 7px auto 0;
    cursor: pointer;
    display: block;
}

.option-actions {
    display: flex;
    align-items: center;
}

.option-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-danger) !important;
    border-color: var(--bs-danger) !important;
    color: white !important;
    border-radius: 0.375rem;
}

.option-actions .btn:hover {
    background-color: var(--bs-danger-hover) !important;
    border-color: var(--bs-danger-active) !important;
}

.option-actions .btn img {
    width: 0.875rem;
    height: 0.875rem;
    filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
    .option-content {
        flex-direction: column;
        align-items: stretch;
    }

    .option-default-group {
        min-width: auto;
    }
}
