/**
 * Plant Calculator Styles
 * Styling for the plant calculator feature in assignments
 */

/* Calculator Container - Three Column Layout */
.calculator-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
}

/* Individual Columns */
.calculator-column {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Column Headers */
.column-header {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.column-header i {
    font-size: 20px;
}

.column-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Column Content */
.column-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Field Groups (Dynamic Fields) */
#dynamic-fields {
    flex: 1;
    margin-bottom: 20px;
}

.field-group {
    margin-bottom: 16px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.field-group > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

/* Field Row (Min/Max inputs) */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-input-group {
    display: flex;
    flex-direction: column;
}

.small-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-input-group .form-control {
    padding: 8px 10px;
    font-size: 13px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-large {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    min-height: 200px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.empty-state small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
}

.empty-state.error {
    color: #dc2626;
}

.empty-state.error i {
    color: #dc2626;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
}

.loading-state i {
    font-size: 36px;
    margin-bottom: 16px;
    color: #f97316;
}

.loading-state p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Results List */
.results-list {
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.result-item:hover {
    border-color: #f97316;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.1);
}

.result-item.no-results {
    opacity: 0.6;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.area-color-badge {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.area-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
}

.result-count {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    min-width: 40px;
    text-align: center;
}

.result-count.zero {
    background: #e5e7eb;
    color: #6b7280;
}

/* Total Result Card */
.total-result {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.total-label {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.total-number {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .calculator-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calculator-column:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }
    
    .column-header {
        padding: 12px 16px;
    }
    
    .column-header h2 {
        font-size: 14px;
    }
    
    .column-content {
        padding: 16px;
    }
    
    .field-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .total-number {
        font-size: 36px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

