/* Plant Climate Suitability Tool with Geographic Data */

#plant-climate-suitability {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

#plant-climate-suitability h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

#plant-climate-suitability h4 {
    color: #34495e;
    margin: 25px 0 15px 0;
    font-size: 20px;
    font-weight: 500;
}

.pcs-form {
    margin-bottom: 25px;
}

.pcs-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

#plant-select {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

#plant-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.climate-info {
    background: linear-gradient(135deg, #ebf3fd, #d6eaf8);
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.climate-info p {
    margin: 0;
    color: #2980b9;
    font-size: 14px;
    font-weight: 500;
}

#climate-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

#climate-table thead {
    background: linear-gradient(135deg, #3498db, #5dade2);
}

#climate-table th {
    padding: 18px 12px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.5px;
}

#climate-table th:first-child {
    width: 15%;
}

#climate-table th:nth-child(2) {
    width: 18%;
}

#climate-table th:nth-child(3) {
    width: 12%;
}

#climate-table th:nth-child(4) {
    width: 15%;
}

#climate-table th:last-child {
    width: 40%;
}

#climate-table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e9ecef;
}

#climate-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#climate-table tbody tr:hover {
    background-color: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#climate-table td {
    padding: 16px 12px;
    vertical-align: top;
    line-height: 1.6;
    font-size: 13px;
}

#climate-table td:first-child {
    font-weight: 600;
    color: #2c3e50;
    background-color: rgba(52, 152, 219, 0.05);
    border-right: 2px solid #3498db;
}

/* Geographic data styling */
.geographic-data {
    font-size: 12px;
    line-height: 1.5;
}

.geo-section {
    margin-bottom: 8px;
    padding: 4px 0;
    border-left: 3px solid #f39c12;
    padding-left: 8px;
    margin: 6px 0;
    background: rgba(243, 156, 18, 0.05);
    border-radius: 0 4px 4px 0;
}

.geo-section strong {
    color: #2c3e50;
    font-weight: 600;
    display: inline-block;
    min-width: 80px;
}

.geo-section:last-child {
    margin-bottom: 0;
}

/* Climate data specific styling */
.temperature-data {
    color: #e74c3c;
    font-weight: 500;
}

.humidity-data {
    color: #3498db;
    font-weight: 500;
}

.rainfall-data {
    color: #27ae60;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 1200px) {
    #climate-table {
        font-size: 12px;
    }
    
    #climate-table th,
    #climate-table td {
        padding: 12px 8px;
    }
    
    .geographic-data {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    #plant-climate-suitability {
        padding: 15px;
        margin: 10px 0;
    }
    
    #plant-climate-suitability h3 {
        font-size: 20px;
    }
    
    #plant-select {
        max-width: 100%;
    }
    
    #climate-table {
        font-size: 11px;
    }
    
    #climate-table th,
    #climate-table td {
        padding: 8px 6px;
    }
    
    .climate-info {
        padding: 12px 15px;
        margin: 15px 0;
    }
    
    .geo-section {
        margin-bottom: 6px;
    }
}

@media (max-width: 600px) {
    #climate-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 6px;
    }
    
    #climate-table thead,
    #climate-table tbody,
    #climate-table th,
    #climate-table td,
    #climate-table tr {
        display: block;
        white-space: normal;
    }
    
    #climate-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    #climate-table tr {
        border: 1px solid #ddd;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 6px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    #climate-table td {
        border: none;
        position: relative;
        padding: 10px 10px 10px 35%;
        text-align: left;
    }
    
    #climate-table td:before {
        position: absolute;
        left: 6px;
        width: 30%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #2c3e50;
        font-size: 11px;
    }
    
    #climate-table td:nth-of-type(1):before { content: "Plant: "; }
    #climate-table td:nth-of-type(2):before { content: "Temperature: "; }
    #climate-table td:nth-of-type(3):before { content: "Humidity: "; }
    #climate-table td:nth-of-type(4):before { content: "Rainfall: "; }
    #climate-table td:nth-of-type(5):before { content: "Suitable Regions: "; }
    
    .geographic-data {
        padding-top: 10px;
    }
    
    .geo-section {
        margin-bottom: 8px;
        padding: 6px 8px;
        background: rgba(243, 156, 18, 0.1);
        border-radius: 4px;
        border-left: 3px solid #f39c12;
    }
    
    .geo-section strong {
        display: block;
        margin-bottom: 2px;
        color: #d35400;
    }
}

/* Loading and transition effects */
#climate-display {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}