/**
 * 회사/바이어 정보 테이블 공용 CSS
 *
 * 참가기업: get_company_info_table_html() - 사용법: match/includes/comp_view_header.php 참조
 * 바이어: get_buyer_info_table_html() - 사용법: match/includes/buyer_view_detail.php 참조
 * 함수 위치: com/secon.lib.php
 */
.company-info-table {
    display: flex;
    flex-direction: column;
    margin: 0px 0 10px 0px;
}

.company-info-table .info-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid #e8e8e8;
}


body.en .company-info-table .info-row{grid-template-columns: 150px 1fr;}

.company-info-table .info-row:last-child {
    /*border-bottom: none; 1:1 chat */
}

.company-info-table .info-label {
    padding-left:10px;
	font-weight: 400;
    color: #666;
    font-size: 15px;
}

.company-info-table .info-value {
    font-weight: 500;
    color: #000;
    font-size: 15px;
    line-height: 1.6;
}

/* 홈페이지 링크 (상담가능언어 아래) */
.info-homepage-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #000;
    text-decoration: none;
    word-break: break-all;
}

.info-homepage-link:hover {
    text-decoration: underline;
}

/* 확장 가능한 정보값 (item) */
.info-value-expandable {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-value-expandable .info-text-clamp {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-value-expandable .info-text-clamp.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.info-value-expandable .btn-expand {
    flex-shrink: 0;
    padding: 0;
    font-size: 16px;
    color: #666;
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    align-self: flex-start;
    line-height: 1;
    margin-top: 3px;
}

.info-value-expandable .btn-expand:hover {
    color: #333;
}

.info-value-expandable .btn-expand.hidden {
    display: none;
}

/* ===================================
   반응형 - 768px 이하
   =================================== */
@media (max-width: 768px) {
    .company-info-table .info-row {
        gap: 10px;
        padding: 3px 0;
    }
}

/* ===================================
   반응형 - 850px 이하 (인라인 레이아웃)
   =================================== */
@media (max-width: 850px) {
    .company-info-table .info-row {
        display: block;
        padding: 8px 0px 8px 10px;
        text-indent: -10px;
    }

    .company-info-table .info-label {
        display: inline;
        white-space: nowrap;
        margin-right: 8px;
    }

    .company-info-table .info-value {
        display: inline;
        word-break: break-word;
		text-indent: 0px;
    }

    /* 전시품목(expandable) 행은 라벨이 2줄 값 아래로 떨어지지 않도록 별도로 flex 처리 */
    .company-info-table .info-row-expandable {
        display: flex;
        align-items: flex-start;
        padding-left: 0px;
        text-indent: 0px;
    }

    .company-info-table .info-row-expandable .info-label {
        display: block;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .company-info-table .info-value-expandable {
        display: flex !important;
        flex: 1;
        min-width: 0;
    }

    .company-info-table .info-text-clamp {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        flex: 1;
        min-width: 0;
    }

    .company-info-table .info-text-clamp.expanded {
        display: block !important;
        overflow: visible;
        white-space: normal;
        word-wrap: break-word;
        word-break: break-word;
    }

    .company-info-table .btn-expand {
        display: inline-block !important;
        margin-left: 4px;
    }
}

/* ============================================================
   바이어 정보 테이블 (get_buyer_info_table_html)
   ============================================================ */

/* 바이어 상세 정보 래퍼 */
.buyer-detail-wrapper {
    margin-bottom: 40px;
}

/* 정보 섹션 */
.buyer-info-section {
    display: flex;
    gap: 0px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.buyer-info-section .section-title {
    flex: 0 0 180px;
    background: #f8f9fa;
    margin-bottom: 0px;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #002244;
    line-height: 1.6;
    text-align: center;
    border-right: 1px solid #e0e0e0;
    border-bottom: 0px;
}

.buyer-info-section .section-content {
    flex: 1;
    padding: 0px;
}

/* 바이어 정보 테이블 */
.buyer-info-table {
    width: 100%;
    border-collapse: collapse;
}

.buyer-info-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.buyer-info-table tbody tr:last-child {
    border-bottom: none;
}

.buyer-info-table th {
    width: 250px;
    padding: 10px 15px;
    text-align: left;
    font-weight: 500;
    color: #002244;
    background: #fafafa;
    vertical-align: top;
	line-height:1.4;
}

.qna-layout .buyer-info-table th{width:180px;}

body.kr .buyer-info-table th {
    width: 150px;
}

.buyer-info-table td {
    padding: 10px 15px;
    color: #222;
    vertical-align: top;
	word-break:keep-all;
}

.buyer-info-table td a {
    color: #002244;
    text-decoration: underline;
}

.buyer-info-table td a:hover {
    color: #ff6600;
}

.buyer-info-table td.content-text {
    line-height: 1.8;
}

/* SNS 행 - td colspan=2(진짜 HTML colspan)로 전체 폭 확보, td 내부 div에서만 flex로 label+아이콘 배치 */
.buyer-info-table .sns-row-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.buyer-info-table .sns-label {
    width: 250px;
    flex-shrink: 0;
    font-weight: 500;
    color: #002244;
}

.buyer-info-table .sns-icon-links {
    gap: 8px;
    margin-bottom: 0;
}

.buyer-info-table .sns-icon-link {
    width: 38px;
    height: 38px;
    font-size: 22px;
}

@media (max-width: 768px) {
    .buyer-info-table .sns-label {
        width: 120px;
        font-size: 13px;
    }
}

/* 400px 이하에서는 제목 없이 아이콘이 전체 폭 차지 */
@media (max-width: 400px) {
    .buyer-info-table .sns-label {
        display: none;
    }
}

/* ===================================
   바이어 테이블 반응형 - 768px 이하
   =================================== */
@media (max-width: 768px) {
    .buyer-info-section {
        flex-direction: column;
    }

    .buyer-info-section .section-title {
        flex: none;
        width: 100%;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .buyer-info-table th {
        width: 120px;
        font-size: 13px;
        padding: 12px 10px;
    }

    .buyer-info-table td {
        padding: 12px 10px;
        font-size: 14px;
    }

	.buyer-info-table.buyer-info-table2 tr,
	.buyer-info-table.buyer-info-table2 th,
	.buyer-info-table.buyer-info-table2 td {
		display:block;
		width:100%;
	}

}
