/**
 * CNPA Form Styles
 *
 * Form-specific styles for the registration form.
 * Mobile-first approach.
 */

/* ========================================
   Form Container
   ======================================== */

.form-container {
    max-width: var(--container-md);
    margin: 0 auto;
    padding: var(--space-4);
}

.form-container form {
    background-color: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-6);
}

/* ========================================
   Form Header
   ======================================== */

.form-header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--gray-100);
}

.form-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.required-indicator {
    color: var(--error);
    font-weight: var(--font-bold);
}

/* ========================================
   Form Sections
   ======================================== */

.form-section {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--gray-100);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.section-title::before {
    content: "";
    width: 4px;
    height: 20px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
}

/* ========================================
   Form Groups
   ======================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

/* ========================================
   Form Inputs
   ======================================== */

.form-input,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: inherit;
    font-size: var(--text-base);
    color: var(--text-primary);
    background-color: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    background-color: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

/* Select Arrow */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 20px;
    padding-right: var(--space-10);
}

/* ========================================
   Form Hints & Errors
   ======================================== */

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-2);
}

.form-error {
    display: block;
    font-size: var(--text-xs);
    color: var(--error);
    margin-top: var(--space-2);
}

/* ========================================
   Document Instructions
   ======================================== */

.document-instructions {
    background-color: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
    border-left: 4px solid var(--primary);
}

.document-instructions p {
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.document-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.document-instructions li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: var(--space-1) 0;
}

/* ========================================
   File Upload
   ======================================== */

.file-upload-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    background-color: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.file-upload-wrapper .form-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ========================================
   reCAPTCHA
   ======================================== */

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: var(--space-6) 0;
}

/* ========================================
   Form Actions
   ======================================== */

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-6);
}

.form-actions .btn {
    min-width: 280px;
}