/* Smart Soil Calculator Styles */
#soil-calculator-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.soil-calculator-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

.input-section, .results-section {
    padding: 30px;
}

.input-section {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
}

.results-section {
    background: #f8fafc;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.card-header {
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-content {
    padding: 0 20px 20px 20px;
}

.icon {
    font-size: 16px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-group small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

/* Shape Tabs */
.shape-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    margin-bottom: 16px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px;
}

.tab-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
}

.tab-btn.active {
    background: white;
    color: #059669;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.shape-content {
    transition: all 0.3s ease;
}

.shape-content.hidden {
    display: none;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 4px;
    font-size: 13px;
}

/* Range Slider */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #059669;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #059669;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.calculate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Styles */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.result-item {
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
}

.result-item.primary {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #059669;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.result-item.primary .result-value {
    color: #059669;
}

.result-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Soil Blend Recommendation */
.soil-blend-recommendation {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.blend-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
}

.blend-content h4 {
    color: #92400e;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.blend-content p {
    color: #78350f;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.blend-ratios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.ratio-item {
    font-size: 13px;
    color: #78350f;
}

/* Bag Results */
.bag-results {
    margin-bottom: 24px;
}

.bag-results h4 {
    color: #374151;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.bag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .bag-grid {
        grid-template-columns: 1fr;
    }
}

.bag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

/* Cost Estimate */
.cost-estimate {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0284c7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.cost-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 8px;
}

.cost-value {
    font-size: 28px;
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 4px;
}

.cost-estimate small {
    color: #075985;
    font-size: 12px;
}

/* Project Summary */
.project-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.project-summary h4 {
    color: #374151;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.project-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-summary li {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 6px;
    padding-left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    #soil-calculator-container {
        padding: 10px;
    }
    
    .input-section, .results-section {
        padding: 20px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.calculating {
    opacity: 0.7;
    pointer-events: none;
}

.calculating .calculate-btn::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}