/* Garden Design AI - Frontend Styles */

.gdai-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.gdai-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gdai-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.gdai-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

/* Form Styles */
.gdai-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.gdai-form-section {
    padding: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.gdai-form-section:last-child {
    border-bottom: none;
}

.gdai-form-section h3 {
    margin: 0 0 25px 0;
    color: #2d3748;
    font-size: 22px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.gdai-form-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.gdai-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gdai-form-group {
    margin-bottom: 20px;
}

.gdai-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
}

.gdai-form-group input,
.gdai-form-group select,
.gdai-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.gdai-form-group input:focus,
.gdai-form-group select:focus,
.gdai-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gdai-form-group input.error,
.gdai-form-group select.error {
    border-color: #f56565;
}

.gdai-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.gdai-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gdai-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.gdai-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.gdai-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gdai-btn-primary.loading {
    position: relative;
}

.gdai-btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.gdai-btn-secondary:hover {
    background: #f7fafc;
    border-color: #667eea;
    color: #667eea;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.gdai-result {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-top: 30px;
    display: none;
}

.gdai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.gdai-result-header h3 {
    margin: 0;
    font-size: 24px;
    color: #2d3748;
}

.gdai-result-content {
    line-height: 1.7;
    color: #4a5568;
}

.gdai-result-content h4 {
    color: #2d3748;
    margin: 25px 0 15px;
    font-size: 20px;
    font-weight: 600;
}

.gdai-result-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.gdai-result-content li {
    margin-bottom: 10px;
}

/* Plant Grid */
.plant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.plant-card {
    background: linear-gradient(135deg, #f6f8fb 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.plant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.plant-card .plant-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.plant-card h5 {
    margin: 0 0 5px;
    color: #2d3748;
    font-size: 16px;
}

.plant-card .scientific-name {
    font-style: italic;
    color: #718096;
    font-size: 14px;
}

/* Result Actions */
.gdai-result-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

/* Error Messages */
.gdai-error {
    background: #fed7d7;
    color: #c53030;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c53030;
}

/* Character Counter */
#char-counter {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

#char-counter.warning {
    color: #f6ad55;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gdai-header h2 {
        font-size: 24px;
    }
    
    .gdai-header p {
        font-size: 16px;
    }
    
    .gdai-form-grid {
        grid-template-columns: 1fr;
    }
    
    .gdai-result-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .gdai-result-actions {
        flex-direction: column;
    }
    
    .gdai-btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .gdai-header,
    .gdai-form,
    .gdai-result-actions,
    .gdai-btn {
        display: none !important;
    }
    
    .gdai-result {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
