/* LAFZ USA - Clean, Minimal Form Styles */
/* No animations, no colors, just clean and professional */

/* Form Container Styling */
.form-container,
form[data-lafz-form],
#registrationForm,
#loginForm {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin: 20px auto;
    border: 1px solid #e5e7eb;
}

/* Form Headers */
form h2, form h3, .form-title {
    color: #111827;
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
}

form p.text-gray-600 {
    text-align: center;
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 14px;
}

/* Form Labels */
form label {
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

/* Input Fields */
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="number"],
form input[type="password"],
form select,
form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    background: #ffffff;
    color: #111827;
    outline: none !important;
}

/* Input Focus States - Simple gray border */
form input:focus,
form select:focus,
form textarea:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 1px #6b7280;
}

/* Placeholder Styling */
form input::placeholder,
form textarea::placeholder {
    color: #9ca3af;
    font-size: 14px;
}

/* Select Dropdown Arrow */
form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Submit Button - Centered */
form button[type="submit"],
form input[type="submit"],
.submit-btn {
    background: #111827;
    color: white;
    padding: 12px 48px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: block;
    margin: 32px auto 0 auto;
    min-width: 200px;
}

/* Submit Button Hover - Just slightly darker */
form button[type="submit"]:hover,
form input[type="submit"]:hover {
    background: #1f2937;
}

/* Submit Button Active */
form button[type="submit"]:active {
    background: #374151;
}

/* Loading State */
form button[type="submit"]:disabled,
form button[type="submit"].loading {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Success State */
form button[type="submit"].success {
    background: #059669 !important;
}

/* Required Field Asterisk */
form label:has(+ input:required)::after,
form label:has(+ select:required)::after,
form label:has(+ textarea:required)::after {
    content: ' *';
    color: #dc2626;
    font-weight: 400;
}

/* Form Field Groups */
form .grid {
    gap: 20px;
}

/* Textarea specific */
form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox and Radio Styling */
form input[type="checkbox"],
form input[type="radio"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
}

/* Error States */
form input:invalid:not(:focus):not(:placeholder-shown),
form select:invalid:not(:focus):not(:placeholder-shown),
form textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc2626;
    background: #fef2f2;
}

/* Success Message */
.form-message.success {
    background: #f0fdf4;
    color: #166534;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    border: 1px solid #bbf7d0;
    font-size: 14px;
}

/* Error Message */
.form-message.error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    border: 1px solid #fecaca;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Form container adjustments */
    .form-container,
    form[data-lafz-form],
    #registrationForm,
    #loginForm {
        padding: 24px 20px;
        margin: 10px;
        border-radius: 8px;
    }
    
    form {
        max-height: 75vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 100px !important;
        position: relative;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Sticky Submit Button for Mobile - Centered */
    form button[type="submit"],
    form input[type="submit"] {
        position: sticky;
        bottom: 0;
        width: calc(100% - 40px);
        margin: 30px 20px 20px 20px;
        border-radius: 6px;
        z-index: 100;
        background: #111827;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Better Mobile Spacing */
    form .grid {
        gap: 16px !important;
        grid-template-columns: 1fr !important;
    }
    
    form input,
    form select,
    form textarea {
        font-size: 16px !important;
        padding: 12px 14px;
    }
    
    /* Larger touch targets */
    form label {
        padding: 4px 0;
        font-size: 14px;
    }
    
    form h2, form h3 {
        font-size: 20px;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    form .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .form-container,
    form[data-lafz-form] {
        padding: 32px;
    }
}

/* Focus Visible for Accessibility */
form input:focus-visible,
form select:focus-visible,
form textarea:focus-visible,
form button:focus-visible {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
}

/* Smooth Scrollbar for Forms */
form::-webkit-scrollbar {
    width: 6px;
}

form::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

form::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

form::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Ensure forms don't stretch too wide */
form[data-lafz-form],
#registrationForm,
#loginForm {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Clean fieldset styling if used */
form fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

form legend {
    padding: 0 10px;
    font-weight: 600;
    color: #374151;
}

/* Clean disabled state */
form input:disabled,
form select:disabled,
form textarea:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}