/**
 * Featured Buyers Shortcode Styles
 */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vina Title Widget */
.vina-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.vina-title-wrapper .vina-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #000000;
}

.vina-title-wrapper .vina-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #3BB77E;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.vina-title-wrapper .vina-view-all svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.vina-title-wrapper .vina-view-all:hover {
    color: #000000;
}

.vina-title-wrapper .vina-view-all:hover svg {
    transform: translateX(4px);
}

.featured-buyers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 26px;
}

.vina-featured-buyers[data-columns="3"] .featured-buyers-grid {
    grid-template-columns: repeat(3, 1fr);
}

.vina-featured-buyers[data-columns="2"] .featured-buyers-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Buyer Card */
.buyer-card {
    position: relative;
    background: #fff;
    padding: 18px 16px;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 1px 1px 15px 0 rgba(0, 0, 0, 0.10);
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Staggered animation delays */
.buyer-card:nth-child(1) {
    animation-delay: 0ms;
}

.buyer-card:nth-child(2) {
    animation-delay: 150ms;
}

.buyer-card:nth-child(3) {
    animation-delay: 300ms;
}

.buyer-card:nth-child(4) {
    animation-delay: 450ms;
}

.buyer-card:nth-child(5) {
    animation-delay: 600ms;
}

.buyer-card:nth-child(6) {
    animation-delay: 750ms;
}

.buyer-card:nth-child(7) {
    animation-delay: 900ms;
}

.buyer-card:nth-child(8) {
    animation-delay: 1050ms;
}

.buyer-card:nth-child(9) {
    animation-delay: 1200ms;
}

.buyer-card:nth-child(10) {
    animation-delay: 1350ms;
}

/* Hover effect only on devices that support hover (not mobile) */
@media (hover: hover) {
    .buyer-card:hover {
        transform: translateY(-4px);
    }
}

/* Header */
.buyer-card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
}

.buyer-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-transform: capitalize;
}

.badge-hot {
    background-color: #ED2629;
    color: #fff;
}

.badge-verified {
    background-color: #279E49;
    color: #fff;
}


.buyer-actions {
    position: absolute;
    top: 44px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-action,
.buyer-actions .btn-action,
a.btn-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #34C759;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.10);
    text-decoration: none;
}

.btn-action:hover,
.buyer-actions .btn-action:hover,
a.btn-action:hover {
    background-color: #E8F5E9;
    color: var(--color-primary, #108D52);
    text-decoration: none;
}

.btn-action:focus,
.buyer-actions .btn-action:focus,
a.btn-action:focus {
    outline: none;
    text-decoration: none;
}


/* Location */
.buyer-location {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ADADAD;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    margin-bottom: 14px;
}

.buyer-location .location-flag {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.25);
}

/* Title */
.buyer-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 20px;
    color: #279E49;
    margin: 0 0 0.625rem 0;
    padding-right: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rating */
.buyer-rating {
    display: flex;
    gap: 0.125rem;
    margin-bottom: 24px;
}

.star {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}


.star:not(.active) svg path {
    fill: #E0E0E0;
}

.star.active svg path {
    fill: #FFB067;
}

/* Description */
.buyer-description-wrapper {
    padding: 10px 12px;
    background-color: #F2F4F7;
    margin-bottom: 20px;
}

.buyer-description {
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    padding-right: 10px;
    color: #7E7E7E;
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar */
.buyer-description::-webkit-scrollbar {
    width: 6px;
}

.buyer-description::-webkit-scrollbar-track {
    background: #D9D9D9;
    border-radius: 4px;
}

.buyer-description::-webkit-scrollbar-thumb {
    background: #279E49;
    border-radius: 4px;
}

.buyer-description::-webkit-scrollbar-thumb:hover {
    background: #A0A0A0;
}

/* Details */
.buyer-details {
    list-style: none;
    padding: 20px 0 20px 6px;
    border-top: 1px solid #D1D0D0;
    margin: 0;
}

.buyer-details li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 14px;
    line-height: 18px;
    font-weight: 500;
}

.buyer-details li:before {
    content: '•';
    color: #333;
    font-weight: bold;
    flex-shrink: 0;
}

.buyer-details .label {
    color: #333;
    font-weight: 500;
}

.buyer-details .value {
    color: #666;
    font-weight: 400;
}

/* Tags */
.buyer-tags {
    display: flex;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #D1D0D0;
    gap: 6px;
}

.tag {
    padding-right: 6px;
    display: inline-block;
    border: none;
    font-size: 12px;
    color: var(--color-secondary);
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1;
    border-right: 1px solid #D1D0D0;
}

.tag:last-child {
    border-right: none;
    padding-right: 0;
}
.tag:hover {
    cursor: pointer;
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .vina-featured-buyers[data-columns="3"] .featured-buyers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dots Navigation */
.featured-buyers-grid .slick-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    gap: 6px;
    position: relative;
}

.featured-buyers-grid .slick-dots li {
    margin: 0;
    width: auto;
    height: auto;
    position: relative;
}

/* Remove all pseudo-elements and shadows */
.featured-buyers-grid .slick-dots li::before,
.featured-buyers-grid .slick-dots li::after,
.featured-buyers-grid .slick-dots li button::before,
.featured-buyers-grid .slick-dots li button::after {
    display: none;
    content: none;
}

.featured-buyers-grid .slick-dots li button {
    width: 6px;
    height: 6px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #D1D0D0;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    transition: all 0.3s ease;
    opacity: 1;
    position: relative;
    box-shadow: none;
    text-indent: 0;
}

.featured-buyers-grid .slick-dots li button:hover,
.featured-buyers-grid .slick-dots li button:focus {
    background: #3BB77E;
    outline: none;
    box-shadow: none;
}

.featured-buyers-grid .slick-dots li.slick-active button {
    background: #3BB77E;
    width: 24px;
    border-radius: 6px;
    box-shadow: none;
}

@media (max-width: 768px) {
    /* Slider styles for mobile - only when slick is initialized */
    .featured-buyers-grid.slick-slider {
        display: block;
        position: relative;
    }
    
    /* When slider is active, override grid */
    .featured-buyers-grid.slick-initialized {
        display: block;
    }
    
    /* Default mobile: single column grid (fallback if slider not loaded) */
    .featured-buyers-grid:not(.slick-initialized) {
        grid-template-columns: 1fr;
    }
    
    .vina-featured-buyers[data-columns="3"] .featured-buyers-grid,
    .vina-featured-buyers[data-columns="2"] .featured-buyers-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-buyers-grid .buyer-card {
        padding: 1rem;
    }
    
    /* Slick slider overrides */
    .featured-buyers-grid.slick-slider .slick-track {
        display: flex;
        align-items: stretch;
    }
    
    .featured-buyers-grid.slick-slider .slick-slide > div {
        height: 100%;
    }
    
    .featured-buyers-grid.slick-slider .slick-slide .buyer-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .buyer-card {
        border: 1px solid #E9ECEF;
        box-shadow: none;
    }
    
    .buyer-card:hover {
        transform: none;
    }
}

