/**
 * Buyer List Cards - Horizontal Layout
 */

.buyer-list-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.buyer-card-horizontal {
    background: #FFFFFF;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 14px;
}

.buyer-card-content {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   Left Section: Main Content
   ========================================================================== */

.buyer-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-right: 1px solid #ECECEC;
    padding-right: 36px;
}

/* Header: Badges, Title, Status */
.buyer-card-header-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.buyer-header-left {
    flex: 1;
    display: flex;
    gap: 8px;
}

.buyer-badges-horizontal {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 400;
    line-height: 12px;
    text-transform: capitalize;
}

.badge-hot {
    background-color: #ED2629;
    color: #FFFFFF;
}

.badge-verified {
    background-color: #279E49;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge-verified svg {
    flex-shrink: 0;
}

.buyer-title-confirmed {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.buyer-title-horizontal {
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
    color: #108D52;
    margin: 0;
    display: inline;
}

.badge-confirmed {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #ECFDF3;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 500;
    line-height: 16px;
    color: #027A48;
}

.buyer-header-right {
    flex-shrink: 0;
}

.buyer-seen-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seen-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 400;
    line-height: 14px;
    color: #667085;
}

.seen-label svg {
    flex-shrink: 0;
}

.seen-label span {
    line-height: 14px;
}

.seen-time {
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    color: #667085;
}

/* Description */
.buyer-description-horizontal {
    background: #FFFFFF;
    padding: 10px 12px;
    min-height: 122px;
    max-height: 122px;
    display: flex;
    align-items: flex-start;
}

.description-text {
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: #7E7E7E;
    text-align: justify;
    max-height: 102px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

.description-text::-webkit-scrollbar {
    width: 6px;
}

.description-text::-webkit-scrollbar-track {
    background: #D9D9D9;
    border-radius: 30px;
}

.description-text::-webkit-scrollbar-thumb {
    background: #279E49;
    border-radius: 30px;
    height: 24px;
}

.description-text::-webkit-scrollbar-thumb:hover {
    background: #A0A0A0;
}

/* Details and Actions */
.buyer-details-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.buyer-details-list {
    flex: 1;
}

.buyer-details-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.buyer-details-list li {
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    list-style: disc;
    margin-left: 1.5em;
}

.detail-label {
    color: #7E7E7E;
}

.detail-value {
    color: #242424;
}

.buyer-actions-horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-send-quotation {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #108D52;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    min-width: 158px;
    justify-content: center;
    text-decoration: none;
}

.btn-send-quotation:hover {
    background: #0d7a43;
    transform: translateY(-1px);
    box-shadow: 0px 4px 2px -2px rgba(0, 0, 0, 0.2), 0px 3px 3px 0px rgba(0, 0, 0, 0.14), 0px 2px 6px 0px rgba(0, 0, 0, 0.12);
}

.btn-send-quotation svg {
    flex-shrink: 0;
}

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 6px;
}

.btn-action-icon:hover {
    background: #F5F5F5;
    transform: translateY(-1px);
}


/* SVG Icon Hover States - Tự quản lý bằng CSS */
.btn-chat:hover .icon-chat {
    color: #108D52 !important;
}

.btn-share:hover .icon-share {
    color: #108D52 !important;
}

/* Tags */
.buyer-tags-horizontal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    position: relative;
}

.tag-link {
    font-size: 12px;
    font-weight: 400;
    line-height: 22px;
    color: #108D52;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.tag-separator {
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: #D0D5DD;
    vertical-align: middle;
}

.tag-link:hover {
    color: #0d7a43;
    text-decoration: underline;
}

/* ==========================================================================
   Right Section: Buyer Profile
   ========================================================================== */

.buyer-card-profile {
    width: 258px;
    flex-shrink: 0;
    padding-left: 20px;
    padding-right: 12px;
    padding-top: 24px;
}

.buyer-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.buyer-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.buyer-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #D4D3D4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 500;
    line-height: 36px;
    color: #000000;
    flex-shrink: 0;
}

.buyer-info-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.buyer-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    color: #108D52;
    margin: 0;
    text-align: center;
}

.buyer-rating-stars {
    display: flex;
    align-items: center;
    gap: 0;
}

.buyer-rating-stars .star {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


.buyer-location-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buyer-location-info .location-flag {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.buyer-location-info span {
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    color: #ADADAD;
}

.buyer-leads-count {
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    color: #ED3934;
    text-align: center;
}

.buyer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 14px;
}
.contact-item-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f9f4;
    padding: 4px;
}

.contact-item span {
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    color: #108D52;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .buyer-card-header-horizontal {
        flex-direction: column;
        gap: 12px;
        position: relative;
    }

    .buyer-header-left {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .buyer-badges-horizontal {
        width: 100%;
    }

    .buyer-title-confirmed {
        width: 100%;
        flex-wrap: wrap;
    }

    .buyer-header-right {
        position: absolute;
        top: 0;
        right: 0;
        width: auto;
    }

    .buyer-seen-info {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .badge {
        font-size: 10px;
        padding: 4px 10px;
    }

    .buyer-card-main {
        border-right: none;
        border-bottom: 1px solid #ECECEC;
        padding-right: 0;
        margin-right: 0;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .buyer-card-content {
        flex-direction: column;
        gap: 10px;
    }

    .buyer-card-horizontal {
        padding: 12px;
    }

    .buyer-card-main {
        gap: 8px;
    }

    .buyer-card-profile {
        width: 100%;
        padding: 0;
    }

    .buyer-details-actions {
        flex-direction: column;
        align-items: start;
        gap: 12px;
    }

    .buyer-actions-horizontal {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-send-quotation {
        flex: 1;
        min-width: auto;
    }

    .buyer-profile-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .buyer-profile-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
        flex: 0 0 auto;
        min-width: 0;
        width: auto;
    }

    .buyer-avatar {
        font-size: 18px;
        flex-shrink: 0;
    }

    .buyer-info-group {
        gap: 6px;
        align-items: flex-start;
        flex: 0 1 auto;
        min-width: 0;
    }

    .buyer-name {
        font-size: 12px;
        line-height: 18px;
        text-align: left;
        margin: 0;
    }

    .buyer-title-horizontal {
        font-size: 14px;
    }

    .buyer-rating-stars {
        justify-content: flex-start;
        order: 2;
    }

    .buyer-rating-stars .star {
        width: 14px;
        height: 12px;
    }

    .buyer-location-info {
        justify-content: flex-start;
        order: 1;
    }

    .buyer-location-info span {
        font-size: 10px;
    }

    .buyer-profile-footer {
        flex: 1;
        min-width: 0;
        align-items: flex-end;
        gap: 6px;
    }

    .buyer-leads-count {
        font-size: 10px;
        padding: 0;
        text-align: right;
        white-space: nowrap;
    }

    .buyer-contact {
        flex-direction: row;
        gap: 10px;
        align-items: flex-end;
        width: auto;
    }

    .contact-item {
        justify-content: flex-end;
        padding: 2px 0;
        white-space: nowrap;
    }

    .contact-item span {
        font-size: 10px;
        word-break: break-word;
        text-align: right;
    }

    .description-text {
        font-size: 12px;
    }

    .buyer-details-list li {
        font-size: 12px;
    }
}