/**
 * Frontend Styles for Mounjaro Price Comparison
 * Design System: Violet (#7C4DFF) + Teal (#08B2A5)
 * Fonts: Poppins (headings) + Inter (body)
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* Container */
.mounjaro-price-comparison {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 40px 0;
}

/* Loading State */
.mpc-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.mpc-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7C4DFF;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: mpc-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Table Header */
.mpc-table-header {
    margin-bottom: 20px;
}

.mpc-table-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.mpc-table-meta {
    color: #666;
    font-size: 14px;
}

/* Price Table */
.mpc-price-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.mpc-price-table table {
    width: 100%;
    border-collapse: collapse;
}

.mpc-price-table thead {
    background: linear-gradient(135deg, #7C4DFF 0%, #6A3FE8 100%);
    color: white;
}

.mpc-price-table th {
    padding: 18px 16px;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.mpc-price-table th:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mpc-price-table th.sortable::after {
    content: '⇅';
    margin-left: 5px;
    opacity: 0.5;
}

.mpc-price-table th.sorted-asc::after {
    content: '▲';
    opacity: 1;
}

.mpc-price-table th.sorted-desc::after {
    content: '▼';
    opacity: 1;
}

.mpc-price-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.mpc-price-table tbody tr:hover {
    background: #f9f9ff;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.1);
}

.mpc-price-table td {
    padding: 20px 16px;
    font-size: 15px;
    color: #333;
}

/* Pharmacy Name Column */
.mpc-pharmacy-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 16px;
    margin-top: 8px;
}

.mpc-pharmacy-logo {
    max-width: 100px;
    max-height: 40px;
    margin-right: 12px;
    vertical-align: middle;
    object-fit: contain;
    display: inline-block;
}

.mpc-pharmacy-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mpc-pharmacy-info {
    flex: 1;
}

/* Price Column */
.mpc-price {
    font-size: 20px;
    font-weight: 600;
    color: #7C4DFF;
    font-family: 'Poppins', sans-serif;
}

.mpc-price-discounted {
    color: #08B2A5;
}

/* Rating */
.mpc-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mpc-rating-stars {
    color: #ffa500;
}

.mpc-rating-value {
    font-weight: 600;
    color: #333;
}

/* Badges */
.mpc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mpc-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mpc-badge-best-value {
    background: #7C4DFF;
    color: white;
}

.mpc-badge-lowest-price {
    background: #08B2A5;
    color: white;
}

.mpc-badge-free-delivery {
    background: #46b450;
    color: white;
}

.mpc-badge-fast-delivery {
    background: #0073aa;
    color: white;
}

.mpc-badge-highest-rated {
    background: #ffa500;
    color: white;
}

.mpc-badge-new {
    background: #ff6b6b;
    color: white;
}

/* Discount Text */
.mpc-discount {
    color: #08B2A5;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
}

/* View Deal Button */
.mpc-view-deal {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #7C4DFF 0%, #6A3FE8 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.mpc-view-deal:hover {
    background: linear-gradient(135deg, #6A3FE8 0%, #5A2FD8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
    color: white;
}

/* Action Cell & CTA Button (New Enhanced Design) */
.mpc-action-cell {
    text-align: center;
    vertical-align: middle;
}

.mpc-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #7C4DFF 0%, #6A3FE8 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.2);
}

.mpc-cta-button:hover {
    background: linear-gradient(135deg, #6A3FE8 0%, #5A2FD8 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(124, 77, 255, 0.4);
    color: white !important;
}

.mpc-cta-button:active {
    transform: translateY(0) scale(1.02);
}

.mpc-button-text {
    font-size: 14px;
    font-weight: 600;
}

.mpc-button-icon {
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.mpc-cta-button:hover .mpc-button-icon {
    transform: translateX(4px);
}

.mpc-no-link {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.mpc-no-discount {
    color: #ccc;
    font-size: 16px;
}

/* Show More/Less Button */
.mpc-show-more {
    text-align: center;
    margin: 30px 0;
}

.mpc-show-more-button {
    display: inline-block;
    padding: 14px 32px;
    background: white;
    color: #7C4DFF;
    border: 2px solid #7C4DFF;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mpc-show-more-button:hover {
    background: #7C4DFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mpc-price-table {
        border-radius: 0;
        box-shadow: none;
    }
    
    .mpc-price-table thead {
        display: none;
    }
    
    .mpc-price-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        background: white;
    }
    
    .mpc-price-table tbody tr:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .mpc-price-table td {
        display: block;
        padding: 10px 0;
        border: none;
        text-align: left !important;
    }
    
    /* Hide data-label for pharmacy column (we show logo + name naturally) */
    .mpc-pharmacy-column::before {
        display: none !important;
    }
    
    /* Show labels for other columns */
    .mpc-price-column::before,
    .mpc-rating-column::before,
    .mpc-discount-column::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        color: #666;
        font-size: 12px;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Pharmacy cell on mobile */
    .mpc-pharmacy-cell {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mpc-pharmacy-logo {
        max-width: 80px;
        max-height: 50px;
        margin: 0;
    }
    
    .mpc-pharmacy-name {
        font-size: 20px;
        margin: 0 0 8px 0;
    }
    
    .mpc-badges {
        margin-top: 8px;
        gap: 6px;
    }
    
    .mpc-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .mpc-service-type {
        margin-left: 0;
        margin-top: 6px;
        display: inline-block;
    }
    
    /* Price on mobile */
    .mpc-price {
        font-size: 28px;
        display: block;
        margin-bottom: 4px;
    }
    
    /* Rating on mobile */
    .mpc-rating {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .mpc-gphc-badge {
        font-size: 12px;
        margin-top: 4px;
    }
    
    /* Discount on mobile */
    .mpc-discount {
        font-size: 14px;
        margin-top: 4px;
    }
    
    /* CTA Button on mobile */
    .mpc-action-cell {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #f0f0f0;
    }
    
    .mpc-cta-button {
        display: flex;
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        justify-content: center;
    }
    
    .mpc-button-text {
        font-size: 16px;
    }
    
    .mpc-button-icon {
        font-size: 20px;
    }
    
    /* Show More button on mobile */
    .mpc-show-more-button {
        width: 100%;
        padding: 16px 32px;
        font-size: 16px;
    }
}

/* GPhC Badge */
.mpc-gphc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.mpc-gphc-verified {
    color: #46b450;
    font-weight: 600;
}

/* Service Type Badge */
.mpc-service-type {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f0f0;
    color: #666;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Empty State */
.mpc-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.mpc-empty-state h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    margin: 20px 0 10px 0;
}

/* Sticky Header (when scrolling) */
.mpc-price-table.sticky-header thead {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}