/* GLP-1 Comparison Table Styles */

.glp1-comparison-block {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 2em 0;
}

/* Filter Section */
.glp1-filters {
    display: flex;
    gap: 1em;
    margin-bottom: 2em;
    padding: 1.5em;
    background: #f5f5f5;
    border-radius: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
}

.glp1-filter {
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.2s;
}

.glp1-filter:hover {
    border-color: #0073aa;
}

.glp1-filter:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.reset-filters {
    padding: 0.5em 1.5em;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
    margin-top: auto;
}

.reset-filters:hover {
    background: #555;
}

/* Top Pick Section */
.glp1-top-pick {
    margin: 2em 0;
    padding: 1.5em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.glp1-top-pick.highlight {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.top-pick-heading {
    margin: 0 0 0.5em;
    font-size: 1.5em;
    font-weight: 700;
}

.top-pick-subtext {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.95;
}

/* Results Counter */
.glp1-results-counter {
    margin-bottom: 1em;
    font-size: 0.95em;
    color: #666;
}

.glp1-results-counter .count {
    font-weight: 600;
    color: #333;
}

/* Table Wrapper */
.glp1-table-wrapper {
    overflow-x: auto;
    margin: 2em 0;
}

/* Comparison Table */
.glp1-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.glp1-comparison-table thead {
    background: #f8f9fa;
}

.glp1-comparison-table th {
    padding: 1em;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.95em;
}

.glp1-comparison-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.glp1-comparison-table tbody tr:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.glp1-comparison-table tbody tr.hidden {
    opacity: 0;
    transform: translateX(-20px);
}

.glp1-comparison-table tbody tr.visible {
    opacity: 1;
    transform: translateX(0);
}

.glp1-comparison-table td {
    padding: 1em;
    vertical-align: top;
}

/* Provider Name Cell */
.provider-name {
    font-weight: 600;
    position: relative;
}

.provider-name .badge {
    display: inline-block;
    margin-left: 0.5em;
    padding: 0.25em 0.75em;
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: normal;
}

/* Rating */
.rating {
    white-space: nowrap;
}

.stars {
    color: #ffc107;
    margin-right: 0.25em;
}

/* Features List */
.features ul {
    margin: 0;
    padding-left: 1.2em;
    list-style: none;
}

.features li {
    position: relative;
    padding-left: 1em;
    margin-bottom: 0.25em;
    font-size: 0.9em;
}

.features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 0.75em 1.5em;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.cta-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    color: white;
    text-decoration: none;
}

/* Mobile Cards View */
.glp1-cards-wrapper {
    display: none;
}

/* Provider Cards for Mobile */
.provider-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5em;
    margin-bottom: 1.5em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.provider-card.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.provider-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25em;
    color: #333;
}

.card-rating {
    margin-bottom: 1em;
    font-size: 1.1em;
}

.card-details {
    margin-bottom: 1em;
}

.detail-row {
    padding: 0.5em 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95em;
}

.detail-row strong {
    display: inline-block;
    width: 100px;
    color: #666;
}

.card-features {
    margin: 1.5em 0;
}

.card-features strong {
    display: block;
    margin-bottom: 0.5em;
    color: #666;
}

.card-features ul {
    margin: 0;
    padding-left: 1.2em;
    list-style: none;
}

.card-features li {
    position: relative;
    padding-left: 1em;
    margin-bottom: 0.25em;
    font-size: 0.9em;
}

.card-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.provider-card .cta-button {
    width: 100%;
    text-align: center;
}

/* No Results Message */
.no-results-message {
    text-align: center;
    padding: 3em 1em;
    color: #666;
    font-size: 1.1em;
}

.no-results-message p {
    margin: 0.5em 0;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glp1-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .reset-filters {
        width: 100%;
        margin-top: 1em;
    }
    
    .glp1-comparison-table {
        display: none;
    }
    
    .glp1-cards-wrapper {
        display: block;
    }
    
    .top-pick-heading {
        font-size: 1.2em;
    }
    
    .top-pick-subtext {
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    .glp1-filters,
    .reset-filters,
    .glp1-top-pick {
        display: none;
    }
    
    .glp1-comparison-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .cta-button {
        background: none;
        color: #007cba;
        border: 1px solid #007cba;
    }
}

/* Accessibility */
.glp1-comparison-block *:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading State */
.glp1-comparison-block.loading {
    opacity: 0.6;
    pointer-events: none;
}

.glp1-comparison-block.loading::after {
    content: "Updating...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1em 2em;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
