/* Form groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Inputs */
.form-group input:not([type="file"]):not([type="color"]):not([type="radio"]),
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Focus states */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--secondary-color);
}

/* Textareas */
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

/* Image previews */
.image-preview {
    width: 150px;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 0.5rem 0;
    border: 2px solid #e5e7eb;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Image upload container */
.image-upload-container {
    margin-top: 0.5rem;
}

/* File inputs */
.form-group input[type="file"] {
    padding: 0.5rem 0;
    cursor: pointer;
}

/* Color inputs */
.form-group input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* Color preview */
.color-preview {
    width: 100px;
    height: 30px;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

/* Background controls */
.background-controls {
    margin-top: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #e5e7eb;
    border-radius: 2px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.value-display {
    min-width: 50px;
    text-align: right;
    color: var(--light-text);
}

/* Help text */
.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--light-text);
    font-size: 0.875rem;
}

/* Required fields */
.form-group label.required::after {
    content: "*";
    color: var(--error-color);
    margin-left: 0.25rem;
}

/* Disabled state */
.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Form actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .value-display {
        text-align: left;
    }
}