/**
 * Vehicle Info Popup Common CSS
 * 차량 정보 팝업 공통 스타일
 */

/* 팝업 모달 스타일 */
.vehicle-info-modal .modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

.vehicle-info-modal .modal-content {
    border-radius: 8px;
}

.vehicle-info-modal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.vehicle-info-modal .modal-title {
    font-weight: 600;
    color: #333;
    font-size: 1.25rem;
}

.vehicle-info-modal .modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.vehicle-info-modal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* 차량 정보 테이블 스타일 */
.vehicle-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background-color: #fff;
    font-size: 14px;
}

.vehicle-info-table th,
.vehicle-info-table td {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: middle;
}

.vehicle-info-table th {
    background-color: #f1f3f5;
    font-weight: 600;
    color: #495057;
    width: 20%;
    white-space: nowrap;
}

.vehicle-info-table td {
    background-color: #fff;
    color: #212529;
    width: 30%;
}

/* 테이블 행 호버 효과 */
.vehicle-info-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 빈 값 스타일 */
.vehicle-info-table td:empty::before {
    content: "-";
    color: #adb5bd;
}

/* 변경 이력 테이블 스타일 */
.vehicle-history-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #dee2e6;
}

.vehicle-history-section h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.vehicle-history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 13px;
    table-layout: auto;
}

.vehicle-history-table th,
.vehicle-history-table td {
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.vehicle-history-table th {
    background-color: #e9ecef;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.vehicle-history-table td {
    background-color: #fff;
    color: #212529;
}

/* 변경 이력 테이블 행 호버 */
.vehicle-history-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 변경 이력 테이블 스크롤 컨테이너 */
.vehicle-history-wrapper {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* 변경 이력 없을 때 */
.no-history-message {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* 로딩 스피너 */
.vehicle-info-loading {
    text-align: center;
    padding: 3rem;
}

.vehicle-info-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* 에러 메시지 */
.vehicle-info-error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.vehicle-info-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .vehicle-info-modal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
    }

    .vehicle-info-table th {
        width: 30%;
    }

    .vehicle-info-table td {
        width: 70%;
    }

    .vehicle-info-table,
    .vehicle-history-table {
        font-size: 12px;
    }

    .vehicle-info-table th,
    .vehicle-info-table td,
    .vehicle-history-table th,
    .vehicle-history-table td {
        padding: 6px 8px;
    }
}

/* 작은 화면에서 테이블 스크롤 */
@media (max-width: 576px) {
    .vehicle-info-modal .modal-dialog {
        max-width: 100%;
        margin: 0;
    }

    .vehicle-info-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* 데이터 강조 */
.vehicle-info-table .highlight-data {
    font-weight: 600;
    color: #0d6efd;
}

/* 날짜 데이터 스타일 */
.vehicle-info-table .date-data {
    color: #6c757d;
}

/* 코드 데이터 스타일 */
.vehicle-info-table .code-data {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
}
