/* ===== Form Controls ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--muted-light);
}

.form-group label .required {
    color: #f87171;
}

.form-group .hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--black);
    color: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-dim);
}

.form-control::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.form-actions .btn {
    flex: 1;
}

/* Error message */
.form-error {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(220, 38, 38, 0.2);
    margin-bottom: 1.5rem;
    display: none;
}

.form-error.visible {
    display: block;
}

/* Success/error messages (inline) */
.form-message {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
}

.form-message--success {
    display: block;
    color: #34d399;
}

.form-message--error {
    display: block;
    color: #f87171;
}

/* Contact form card */
.contact-form {
    background: var(--black-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* Form container (create, order pages) */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

/* Form sections (order page) */
.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    color: var(--amber);
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 12, 0.92);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.visible {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--muted-light);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 1.5rem;
    }
}
