/* Pool Robot Tracker Styles */

/* Color scheme - lake blue #1e90ff for all buttons */

.pool-robot-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.pool-robot-table th, .pool-robot-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.pool-robot-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.pool-robot-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.pool-robot-table tr:hover {
    background-color: #f1f1f1;
}

.pool-robot-table td a {
    text-decoration: none;
    color: inherit;
}

.pool-robot-table .description-cell {
    min-width: 250px !important;
    max-width: 250px !important;
    padding: 10px !important;
    position: relative;
    overflow: hidden;
}

.description-wrapper {
    display: block;
    white-space: normal;
    word-wrap: break-word;
    max-height: 4.2em;
    overflow: hidden;
}

.description-link {
    color: #333 !important;
    text-decoration: none !important;
    display: block !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    position: static !important;
    padding-right: 0 !important;
}

.description-link:after {
    display: none !important;
    content: none !important;
}

.description-link:hover {
    color: #0066cc;
    text-decoration: underline;
}

.check-price-button, .view-product-btn, .apply-filter-button, .reset-button {
    background-color: #1e90ff !important;
    color: white !important;
    padding: 8px 15px !important;
    border: none !important;
    border-radius: 15px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    display: inline-block !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: background-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.5 !important;
    height: auto !important;
}

.check-price-button:hover, .view-product-btn:hover, .apply-filter-button:hover, .reset-button:hover {
    background-color: #0066cc !important;
    opacity: 0.9;
}

.responsive-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pool-robot-filter {
    background-color: #f5f5f5;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.pool-robot-filter h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #000000;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.filter-left {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    max-width: 80%;
}

.filter-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    width: calc(33.333% - 15px);
    max-width: 300px;
    margin-bottom: 10px;
}

.advanced-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.advanced-checkbox label {
    margin-left: 5px;
    font-weight: bold;
    color: #555;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.filter-group select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    max-height: 300px;
    overflow-y: auto;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 180px !important;
}

.apply-filter-button, .reset-button {
    width: 100% !important;
    min-width: 150px !important;
    box-sizing: border-box !important;
}

#loading-indicator {
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

/* Hide advanced columns by default */
.advanced-column {
    display: none;
}

/* Tablet and small desktop */
@media screen and (max-width: 768px) {
    .filter-container {
        flex-direction: column;
    }
    
    .filter-left {
        flex-direction: column;
        max-width: 100%;
        gap: 10px;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .filter-right {
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
        max-width: 100%;
    }
    
    .filter-actions {
        flex-direction: row; /* Horizontal layout for tablets */
        width: 100%;
        gap: 15px;
        justify-content: center;
    }
    
    .apply-filter-button, .reset-button {
        width: 45% !important; /* Width for side-by-side on tablets */
        margin: 0 auto;
    }
    
    .pool-robot-table {
        width: 100%;
        display: block;
        font-size: 12px;
    }
    
    .pool-robot-table .description-cell {
        max-width: 200px;
    }
    
    .check-price-button, .view-product-btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}

/* Mobile phones only */
@media screen and (max-width: 480px) {
    .filter-actions {
        flex-direction: column; /* Vertical layout for mobile phones */
        width: 100%;
        gap: 15px;
        justify-content: center;
        align-items: center;
    }
    
    .apply-filter-button, .reset-button {
        width: 60% !important; /* Wider buttons for mobile */
        margin: 0 auto;
    }
}