body,
html {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    padding: 0;
    height: 100%;
    margin: 0;
    overflow: hidden;
    /* Prevent body from scrolling */
}

.header {
    position: fixed;
    background-color: #7F170E;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    width: 100%;
    height: 35px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header h1 {
    position: absolute;
    left: 45.5vw;
    z-index: 1000;
}

.logo_Rex {
    position: relative;
    margin-top: 0.3vw;
    left: 1.8vw;
    align-items: center;
    z-index: 1000;
    /* 다른 요소보다 높은 값으로 설정 */
    transform: scale(1.25);
}

.logo_Rex_Text {
    position: relative;
    margin-top: 0.3vw;
    margin-left: 3.5vw;
    z-index: 1000;
    /* 다른 요소보다 높은 값으로 설정 */
    transform: scale(1.25);
}

.logo_customer{
    position: relative;
    margin-top: 0.3vw;
    margin-left: 3.5vw;
    z-index: 1000;
    /* 다른 요소보다 높은 값으로 설정 */
    transform: scale(1.25);
}


.language-toggle{
    padding-top:1%;
    margin-top: auto;
}

.language-toggle a{
    color:white;
}

.content-wrapper {
    height: calc(100% - 70px);
    /* Adjust this value based on header height */
    overflow-y: auto;
}

.container {
    margin-left: 20px;
    margin-bottom: 120px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    /* 수평 중앙 정렬 */
    gap: 20px;
    /* 간격 추가 */
    padding: 15px;
}

.content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 2px;
    justify-content: center;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 5px;
    font-size:18px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

th {
    height: 30px;
    background-color: #7F170E;
    color: white;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.buttons button,
.header-buttons button,
.toggle-buttons button,
.btn {
    padding: 10px 20px;
    margin-left: 2px;
    font-weight: bold;
    font-size: 18px;
    background-color: #7F170E;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.buttons button:hover,
.header-buttons button:hover,
.toggle-buttons button:hover,
.btn:hover {
    opacity: 0.7;
}

.button-container,
.buttons-container {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

#status_message {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #7F170E;
    color: white;
    padding: 10px 60px 10px 20px;
    border-top: 1px solid #ddd;
    white-space: pre-line;
    display: flex;
    justify-content: center;
    align-items: center;
}

#status_message .status-text {
    text-align: center;
}

#status_message .status-build {
    position: absolute;
    right: 20px;
    font-weight: 600;
}

#progress {
    position: fixed;
    width: 100%;
    bottom: 40px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-left: 80px;
    display: none;
    /* initially hidden */
}

#progress-bar {
    height: 30px;
    background-color: #008000;
    width: 0;
}

.success-message {
    margin: 10px 0;
    color: green;
}

.error-message {
    margin: 10px 0;
    color: red;
}

img {
    max-width: 100%;
    height: auto;
}

.image-container {
    display: flex;
    overflow: hidden;
    justify-content: space-between;
    margin: 10px 0;
    height: calc(80vh - 40px);
    /* 제목 공간 확보 */
    position: relative;
}

.image-size-label {
    position: absolute;
    top: 33px;
    right: 8px;
    color: rgb(115, 115, 115);
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000;
}

.master-label {
    position: absolute;
    top: 33px;
    left: 8px;
    color: rgb(115, 115, 115);
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000;
}

.full-image {
    width: 100%;
    height: auto;
    /* 높이 자동 조정 */
    object-fit: contain;
}

.tile-container {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 10px;
    border: 1px solid #ddd;
}

.tile-container .title {
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    background-color: #f7f7f7;
    width: 100%;
}

.tile-container img {
    max-width: 100%;
    height: auto;
}

.tile {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    border: 4px solid #ddd;
    /* 타일 구분을 위한 테두리 */
    padding: 0;
    /* 간격 없애기 */
    margin: 0;
    /* 간격 없애기 */
    position: relative;
}

.tile.selected {
    border-color: 10px #7F170E;
    /* 선택된 타일의 테두리 색상 변경 */
    box-shadow: 0 0 10px #7F170E;
    /* 선택된 타일에 그림자 추가 */
    opacity: 0.7;
}

.tile-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: rgba(127, 23, 14, 0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 17px;
    z-index: 1;
    opacity: 0.5;
}

.bounding-box {
    position: absolute;
    border: 3px solid yellow;
}

.header-buttons {
    position: absolute;
    top: 10px;
    left: 10px;
}

.toggle-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.content-container .content {
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-row {
    display: flex;
    width: 100%;
    gap: 20px;
    align-items: flex-start;
}

.buttons-container {
    width: 100%;
    text-align: center;
}

#ref_tiles,
#query_tiles {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 2px;
}

input[type="file"] {
    margin: 0px 0;
}

input[type="submit"],
button {
    margin: 0px 0;
}

input[type="submit"]:hover,
button:hover {}

.image-container div {
    width: 45%;
}

.input-group {
    display: flex;
    align-items: center;
}

.upload-form {
    margin-bottom: 0px;
}

.title {
    font-size: 1.5em;
    /* h2 사이즈 글자 */
    font-weight: bold;
    margin-bottom: 10px;
}

.sidebar {
    position: fixed;
    top: 70px;
    /* Adjust this value based on header height */
    bottom: 0;
    left: 0;
    width: 150px;
    background-color: #f7f7f7;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sidebar button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    cursor: pointer;
}

.user-info {
    font-size: 1.1em;
    top: 0.8%;
    right: 2%;
    text-align: right;
    position: absolute;
    z-index:1001;
    color:white;
}

.result-icon {
    color: gray;
    cursor: not-allowed;
    /* 비활성화된 상태에서 클릭 불가 */
    transition: color 0.3s;
    margin-right: 15px;
}

.result-icon.active {
    color: green;
    /* 활성화된 아이콘은 초록색으로 표시 */
    cursor: pointer;
    /* 활성화된 상태에서 클릭 가능 */
    margin-right: 15px;
}

/* 아이콘 크기 */
.analysis-icon,
.result-icon,
.csv-icon {
    font-size: 24px;
    /* 아이콘 크기를 키움 */
    margin-right: 15px;
}

/* 아이콘 사이의 간격 */
.analysis-icon {
    margin-right: 15px;
    /* 분석 아이콘과 결과 아이콘 사이 간격 */
}

* {
    font-family: 'Pretendard Variable', sans-serif;
}

.loadingMessage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    background: rgb(255, 255, 255);
    visibility: hidden;
    align-items: center;
    justify-content: start;
    padding-left: calc(50% - 150px);
    font-size: 40px;
    z-index: 9999;
}

@keyframes pulsate {
    0% {
        box-shadow: 0 0 5px rgba(0, 0, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 0, 255, 1);
    }

    100% {
        box-shadow: 0 0 5px rgba(0, 0, 255, 0.5);
    }
}

.defect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 255, 0.2);
    /* Blue glow effect */
    animation: glow 2s infinite;
}

@keyframes glow {
    0% {
        background: rgba(0, 0, 255, 0.1);
    }

    50% {
        background: rgba(0, 0, 255, 0.3);
    }

    100% {
        background: rgba(0, 0, 255, 0.1);
    }
}

.defect-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: yellow;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.reset_button{
    font-size:20px;
}

.sortingbox{
    font-size:20px;
}

.buttons-container-1 button{
    font-size:20px;
}