/* Form page layout */
.form-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 2rem 2rem;
}

.form-container {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 480px;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #64748b;
    font-size: 1rem;
}

/* Form styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group input:invalid {
    border-color: #ef4444;
}

/* Checkbox styles */
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Button styles */
.btn-full {
    width: 100%;
    margin-top: 1rem;
}

/* Form footer */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.form-footer p {
    color: #64748b;
    margin-bottom: 0.5rem;
}

.form-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Enhanced mobile responsiveness */
@media (max-width: 1024px) {
    .form-container {
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .form-page {
        padding: 4rem 1rem 1rem;
        min-height: 100vh;
        background-attachment: fixed;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
        margin: 0 auto;
        border-radius: 12px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    
    .form-header h2 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .form-header p {
        font-size: 0.9rem;
    }
    
    /* Improved form inputs for mobile */
    .form-group input,
    .form-group select {
        padding: 1rem 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
        border: 2px solid #e5e7eb;
        background-color: #ffffff;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-group select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.5rem center;
        background-repeat: no-repeat;
        background-size: 1.5em 1.5em;
        padding-right: 2.5rem;
    }
    
    /* Better touch targets */
    .checkbox-label {
        padding: 0.5rem 0;
        min-height: 44px;
        align-items: center;
    }
    
    .checkmark {
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }
    
    /* Improved button styling */
    .btn-full {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
        border-radius: 8px;
        font-weight: 600;
        margin-top: 1.5rem;
    }
    
    /* Form spacing */
    .form {
        gap: 1.25rem;
    }
    
    .form-footer {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .form-footer p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .form-page {
        padding: 3rem 0.75rem 1rem;
    }
    
    .form-container {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-header p {
        font-size: 0.875rem;
    }
    
    /* Smaller screens adjustments */
    .form-group input,
    .form-group select {
        padding: 0.875rem 0.75rem;
    }
    
    .checkbox-label {
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    
    .btn-full {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Focus states for better accessibility */
@media (max-width: 768px) {
    .form-group input:focus,
    .form-group select:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }
    
    .btn:focus {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }
    
    /* Improved error states */
    .form-group input:invalid:not(:focus) {
        border-color: #ef4444;
        background-color: #fef2f2;
    }
    
    /* Auto-fill styling */
    .form-group input:-webkit-autofill {
        -webkit-box-shadow: 0 0 0 1000px white inset;
        border: 2px solid #e5e7eb;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .form-page {
        padding: 2rem 1rem 1rem;
    }
    
    .form-header {
        margin-bottom: 1.5rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form {
        gap: 1rem;
    }
}