/* Soil pH Requirement Checker Styles */

.ph-checker-container {
    max-width: 750px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.checker-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.checker-header h3 {
    color: #8b4513;
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.checker-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.checker-form {
    margin-bottom: 30px;
}

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

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

.plant-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

.plant-select:focus {
    outline: none;
    border-color: #d2691e;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

.show-ph-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #8b4513 0%, #cd853f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.show-ph-btn:hover {
    background: linear-gradient(135deg, #654321 0%, #8b4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.show-ph-btn:active {
    transform: translateY(0);
}

.ph-result {
    min-height: 50px;
}

.result-container {
    background: #fefcf9;
    border: 2px solid #f0e6d2;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.plant-title {
    color: #8b4513;
    font-size: 22px;
    margin: 0 0 25px 0;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #f0e6d2;
    padding-bottom: 15px;
}

.ph-overview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f5f0;
    border-radius: 8px;
    border: 1px solid #e6d5b7;
}

.ph-range-section h4,
.tolerance-section h4,
.amendments-section h4,
.tips-section h4 {
    color: #8b4513;
    font-size: 16px;
    margin: 0 0 15px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ph-range {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
    min-width: 150px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.ph-range.very-acidic {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.ph-range.acidic {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

.ph-range.neutral {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.ph-range.alkaline {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.category-info {
    color: #8b4513;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: center;
}

.optimal-ph {
    color: #654321;
    font-size: 14px;
    text-align: center;
}

.tolerance-level {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.tolerance-level.very-high {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.tolerance-level.high {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.tolerance-level.moderate {
    background: #fde68a;
    color: #78350f;
    border: 1px solid #fcd34d;
}

.tolerance-level.low {
    background: #fed7d7;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.tolerance-level.very-low {
    background: #fecaca;
    color: #7f1d1d;
    border: 1px solid #f87171;
}

.amendments-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
}

.amendments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.too-acidic,
.too-alkaline {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0f2fe;
}

.too-acidic {
    border-left: 3px solid #ef4444;
}

.too-alkaline {
    border-left: 3px solid #3b82f6;
}

.too-acidic h5,
.too-alkaline h5 {
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.too-acidic p,
.too-alkaline p {
    margin: 0;
    color: #6b7280;
    line-height: 1.4;
    font-size: 14px;
}

.tips-section {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #22c55e;
}

.tips-section h4 {
    color: #166534;
}

.growing-tips {
    color: #166534;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
    font-style: italic;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ph-checker-container {
        margin: 10px;
        padding: 15px;
        border-radius: 8px;
    }
    
    .checker-header h3 {
        font-size: 20px;
    }
    
    .plant-title {
        font-size: 18px;
    }
    
    .ph-overview {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .amendments-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ph-range {
        font-size: 18px;
        padding: 10px 20px;
        min-width: 120px;
    }
    
    .too-acidic,
    .too-alkaline {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .ph-checker-container {
        margin: 5px;
        padding: 12px;
    }
    
    .checker-header h3 {
        font-size: 18px;
    }
    
    .plant-select {
        font-size: 14px;
        padding: 10px 14px;
        padding-right: 40px;
    }
    
    .show-ph-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .result-container {
        padding: 20px;
    }
    
    .plant-title {
        font-size: 16px;
    }
    
    .ph-overview {
        padding: 12px;
    }
    
    .ph-range {
        font-size: 16px;
        padding: 8px 16px;
        min-width: 100px;
    }
    
    .amendments-section h4,
    .tips-section h4 {
        font-size: 14px;
    }
    
    .tolerance-level {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Loading state */
.ph-checker-container.loading .show-ph-btn {
    background: #ccc;
    cursor: not-allowed;
}

.ph-checker-container.loading .show-ph-btn:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Focus states for accessibility */
.plant-select:focus,
.show-ph-btn:focus {
    outline: 2px solid #d2691e;
    outline-offset: 2px;
}

/* Enhanced visual elements */
.ph-range-section {
    text-align: center;
}

.tolerance-section {
    text-align: center;
}

/* Special pH scale visualization */
.ph-range {
    position: relative;
    overflow: hidden;
}

.ph-range::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
                linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%), 
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    pointer-events: none;
}

/* Print styles */
@media print {
    .ph-checker-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .show-ph-btn {
        display: none;
    }
    
    .plant-select {
        border: 1px solid #333;
    }
    
    .result-container {
        page-break-inside: avoid;
    }
    
    .ph-range {
        background: #f0f0f0 !important;
        color: #333 !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }
}