/**
* ENHANCED FORMS
* Premium form styles and validation
* 2025/2026 Modern Form Design
*/

/* ============================================
  FORM CONTAINER
  ============================================ */
.form-enhanced {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: var(--background-color);
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

body.dark-mode .form-enhanced {
    background: var(--dark-background-color);
    border-color: var(--dark-border-color);
}

/* ============================================
  FORM GROUPS
  ============================================ */
.form-group-enhanced {
    margin-bottom: 25px;
    position: relative;
}

.form-group-enhanced label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* ============================================
  INPUT FIELDS
  ============================================ */
.form-input-enhanced {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input-enhanced:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input-enhanced::placeholder {
    color: var(--text-color-light);
    opacity: 0.6;
}

body.dark-mode .form-input-enhanced {
    background: var(--dark-background-color);
    border-color: var(--dark-border-color);
    color: var(--dark-text-color);
}

/* ============================================
  TEXTAREA
  ============================================ */
.form-textarea-enhanced {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* ============================================
  SELECT
  ============================================ */
.form-select-enhanced {
    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='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

/* ============================================
  CHECKBOX & RADIO
  ============================================ */
.form-checkbox-enhanced,
.form-radio-enhanced {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-checkbox-label,
.form-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 12px;
}

/* ============================================
  VALIDATION STATES
  ============================================ */
.form-input-enhanced.valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2310b981' d='M13.5 2L6 9.5 2.5 6l1.5-1.5L6 6.5l6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.form-input-enhanced.invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23ef4444' d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm3.5 10.1L10.1 11.5 8 9.4 5.9 11.5 4.5 10.1 6.6 8 4.5 5.9 5.9 4.5 8 6.6l2.1-2.1 1.4 1.4L9.4 8l2.1 2.1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

/* ============================================
  ERROR MESSAGES
  ============================================ */
.form-error {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #ef4444;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-success {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #10b981;
}

/* ============================================
  FORM FOOTER
  ============================================ */
.form-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ============================================
  FILE UPLOAD
  ============================================ */
.file-upload-enhanced {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-enhanced input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--background-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-label.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

/* ============================================
  FORM STEPS
  ============================================ */
.form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.form-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.form-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.form-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-color-light);
    transition: all 0.3s ease;
}

.form-step.active .form-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
}

.form-step.completed .form-step-number {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.form-step-label {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-color-light);
    text-align: center;
}

.form-step.active .form-step-label {
    color: var(--text-color);
    font-weight: 600;
}

/* ============================================
  RESPONSIVE DESIGN
  ============================================ */
@media (max-width: 768px) {
    .form-enhanced {
        padding: 25px 20px;
    }

    .form-footer {
        flex-direction: column;
    }

    .form-footer button {
        width: 100%;
    }
}

/* ============================================
  ACCESSIBILITY
  ============================================ */
.form-input-enhanced:focus-visible,
.form-select-enhanced:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.form-error:focus {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

