/**
 * Multi-Retailer Pricing CSS
 * Styles for the "Where to Buy" price comparison widget
 * 
 * File: /wp-content/themes/picks-curated-theme/src/multi-retailer-pricing.css
 */

/* ==========================================
   WHERE TO BUY WIDGET
   ========================================== */

.pc-where-to-buy {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Header */
.wtb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
}

.wtb-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.wtb-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #2563eb;
}

.wtb-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
}

/* Retailers List */
.wtb-retailers {
    padding: 0.5rem;
}

/* Individual Retailer Row */
.wtb-retailer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.wtb-retailer:hover {
    background: #f8fafc;
}

.wtb-retailer:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

/* Best Price Styling */
.wtb-retailer.best-price {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    margin: 0.5rem;
    border-radius: 0.75rem;
}

.wtb-retailer.best-price:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.wtb-best-badge {
    position: absolute;
    top: -0.625rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #10b981;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.wtb-best-badge svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Out of Stock */
.wtb-retailer.out-of-stock {
    opacity: 0.6;
}

.wtb-retailer.out-of-stock .wtb-price {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Retailer Info */
.wtb-retailer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 140px;
}

.wtb-retailer-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wtb-retailer-icon {
    font-size: 1.25rem;
}

.wtb-retailer-name {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: #111827;
    font-size: 0.9375rem;
}

.wtb-fast-shipping {
    color: #2563eb;
}

.wtb-fast-shipping svg {
    width: 1rem;
    height: 1rem;
}

/* Price Section */
.wtb-price-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
    padding-right: 1rem;
}

.wtb-price {
    font-size: 1.375rem;
    font-weight: 700;
    color: #059669;
}

.wtb-original-price {
    font-size: 0.9375rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.wtb-discount {
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: #dc2626;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

/* Actions */
.wtb-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wtb-coupon-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #fef3c7;
    border: 1px dashed #f59e0b;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wtb-coupon-btn:hover {
    background: #fde68a;
}

.wtb-coupon-btn.copied {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.wtb-coupon-btn svg {
    width: 0.875rem;
    height: 0.875rem;
}

.wtb-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wtb-buy-btn:hover {
    filter: brightness(1.1);
    transform: translateX(2px);
    color: white;
}

.wtb-buy-btn svg {
    width: 1rem;
    height: 1rem;
}

.wtb-out-of-stock-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #9ca3af;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
}

/* Footer */
.wtb-footer {
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.wtb-updated {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ==========================================
   COMPACT VERSION
   ========================================== */

.pc-where-to-buy.compact .wtb-header {
    padding: 0.75rem 1rem;
}

.pc-where-to-buy.compact .wtb-title {
    font-size: 1rem;
}

.pc-where-to-buy.compact .wtb-retailer {
    padding: 0.75rem;
}

.pc-where-to-buy.compact .wtb-retailer-logo {
    width: 2rem;
    height: 2rem;
}

.pc-where-to-buy.compact .wtb-retailer-icon {
    font-size: 1rem;
}

.pc-where-to-buy.compact .wtb-retailer-name {
    font-size: 0.875rem;
}

.pc-where-to-buy.compact .wtb-price {
    font-size: 1.125rem;
}

.pc-where-to-buy.compact .wtb-buy-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ==========================================
   PRODUCT CARD PRICE DISPLAY
   ========================================== */

.pc-card-price {
    margin-bottom: 1rem;
}

.pc-card-price-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pc-from-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.pc-price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #059669;
}

.pc-original-price {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.pc-discount-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: #dc2626;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.pc-card-price-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.375rem;
}

.pc-store-count {
    font-size: 0.8125rem;
    color: #6b7280;
}

.pc-compare-prices-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.pc-compare-prices-link:hover {
    text-decoration: underline;
}

.pc-retailer-name {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.price-unavailable {
    font-size: 1rem;
    color: #9ca3af;
    font-style: italic;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .wtb-retailer {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .wtb-retailer-info {
        min-width: auto;
        flex: 1;
    }

    .wtb-price-section {
        justify-content: flex-start;
        padding-right: 0;
        order: 3;
        width: 100%;
    }

    .wtb-actions {
        order: 2;
        margin-left: auto;
    }

    .wtb-buy-btn {
        padding: 0.5rem 1rem;
    }

    .pc-card-price-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .pc-price-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .wtb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .wtb-retailer {
        padding: 0.875rem 0.75rem;
    }

    .wtb-retailer-logo {
        width: 2rem;
        height: 2rem;
    }

    .wtb-retailer-icon {
        font-size: 1rem;
    }

    .wtb-price {
        font-size: 1.125rem;
    }

    .wtb-coupon-btn {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }

    .wtb-buy-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes priceUpdate {
    0% {
        background: #fef3c7;
    }
    100% {
        background: transparent;
    }
}

.wtb-price.updated {
    animation: priceUpdate 1s ease-out;
}

/* ==========================================
   DARK MODE SUPPORT (if needed)
   ========================================== */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}