/* ==========================================
   FORM STYLES
   Enhanced form styling for all forms
   ========================================== */

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-size: 0.97rem;
    color: #444;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background: #f9f9f9;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4285f4;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.form-group textarea {
    height: 80px;
    resize: vertical;
    font-family: inherit;
}

/* Required field indicator styling */
.required {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

.required-fields-notice {
    margin-top: 15px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-left: 3px solid #dc3545;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
}

/* Address display styling */
.address-display {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    min-height: 20px;
    transition: all 0.3s ease;
}

.address-display.updating {
    border-color: #28a745;
    background: #d4edda;
}

/* Character count styling */
.char-count {
    display: block;
    text-align: right;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    transition: color 0.2s;
}

.char-count.warning {
    color: #ff9800;
    font-weight: 500;
}

.char-count.error {
    color: #f44336;
    font-weight: 600;
}

/* Form actions styling */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.form-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary, .secondary-btn {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover, .secondary-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Required field indicators */
.form-group label[for*="name"]::after,
.form-group label[for*="type"]::after {
    content: " *";
    color: #dc3545;
}

/* ==========================================
   MOBILE RESPONSIVE FORM STYLES
   Touch-friendly form optimization
   ========================================== */

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
        border-radius: 6px;
        min-height: 44px; /* Touch-friendly */
        background: #fff;
        border: 2px solid #e1e5e9;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #4285f4;
        box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    }
    
    .form-group textarea {
        min-height: 80px;
        resize: vertical;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
        padding-top: 12px;
    }
    
    .form-actions button {
        padding: 14px 16px;
        font-size: 16px;
        min-height: 48px; /* Touch-friendly */
        border-radius: 6px;
        font-weight: 600;
    }
    
    /* Error styling enhancement for mobile */
    .form-group.error input,
    .form-group.error select,
    .form-group.error textarea {
        border-color: #dc3545;
        background: #fff5f5;
    }
    
    .form-group .error-message {
        color: #dc3545;
        font-size: 13px;
        margin-top: 4px;
        padding: 4px 8px;
        background: #fff5f5;
        border-radius: 4px;
        border-left: 3px solid #dc3545;
    }
}

.requirement-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    margin-right: 8px;
    font-size: 14px;
    width: 16px;
}

.requirement-item.met .requirement-icon {
    color: #28a745;
}

.requirement-item.unmet .requirement-icon {
    color: #6c757d;
}

.requirement-item.met .requirement-text {
    color: #155724;
}

.requirement-item.unmet .requirement-text {
    color: #495057;
}



@media (max-width: 768px) and (min-width: 481px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 15px;
        min-height: 42px;
    }
    
    .form-actions {
        gap: 8px;
    }
    
    .form-actions button {
        padding: 12px 16px;
        font-size: 15px;
        min-height: 44px;
    }
}

