/**
 * Public Pages Form CSS
 * Clean form styling for auth and contact pages
 */

/* ============================================
   Form Container
   ============================================ */
.public-form-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 2.5rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

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

.form-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    color: var(--public-primary, #6366f1);
    font-size: 1.75rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 0.95rem;
    color: #64748b;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* ============================================
   Form Input
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.form-input:hover {
    border-color: #d1d5db;
}

.form-input:focus {
    outline: none;
    border-color: var(--public-primary, #6366f1);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Input with icon */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.input-wrapper .form-input {
    padding-left: 2.75rem;
}

.input-action {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease;
}

.input-action:hover {
    color: #6b7280;
}

/* ============================================
   Form Textarea
   ============================================ */
.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--public-primary, #6366f1);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ============================================
   Form Select
   ============================================ */
.form-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.95rem;
    color: #1f2937;
    background: #f9fafb 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") no-repeat right 0.75rem center;
    background-size: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--public-primary, #6366f1);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ============================================
   Form Checkbox & Radio
   ============================================ */
.form-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    accent-color: var(--public-primary, #6366f1);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--public-primary, #6366f1);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* ============================================
   Form Error Message
   ============================================ */
.form-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #ef4444;
}

.form-error i {
    font-size: 0.875rem;
}

/* ============================================
   Form Helper Text
   ============================================ */
.form-helper {
    margin-top: 0.375rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ============================================
   Form Divider
   ============================================ */
.form-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.form-divider span {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}

/* ============================================
   Social Login Buttons
   ============================================ */
.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-login-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.social-login-btn img {
    width: 20px;
    height: 20px;
}

.social-login-btn.google {
    /* Google specific styling if needed */
}

/* ============================================
   Form Footer
   ============================================ */
.form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.form-footer p {
    font-size: 0.875rem;
    color: #6b7280;
}

.form-footer a {
    color: var(--public-primary, #6366f1);
    font-weight: 600;
    text-decoration: none;
}

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

/* ============================================
   Form Links
   ============================================ */
.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.form-links a {
    color: var(--public-primary, #6366f1);
    text-decoration: none;
}

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

/* ============================================
   Form Alert
   ============================================ */
.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.form-alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-alert.warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: #92400e;
}

.form-alert.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.form-alert i {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.form-alert-content {
    flex: 1;
}

.form-alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.form-alert-message {
    font-size: 0.875rem;
}

/* ============================================
   Contact Form Specific
   ============================================ */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    .contact-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .public-form-container {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .form-logo {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }
}
