/**
 * 회사/바이어 정보 테이블 공용 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;
}

/* 확장 가능한 정보값 (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: 1;
    -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 값은 별도 처리 */
    .company-info-table .info-value-expandable {
        display: inline !important;
    }

    .company-info-table .info-text-clamp {
        display: inline-block !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 120px);
        vertical-align: bottom;
    }

    .company-info-table .info-text-clamp.expanded {
        display: inline !important;
        overflow: visible;
        white-space: normal;
        max-width: 100%;
        word-wrap: break-word;
        word-break: break-word;
    }

    .company-info-table .btn-expand {
        display: inline-block !important;
        vertical-align: bottom;
        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;
}

.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;
}

/* ===================================
   바이어 테이블 반응형 - 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%;
	}

}
