/**
 * Phase 2 Day 4: TM Pre-translate Styles
 * TM 사전번역 기능 스타일
 */

/* Pre-translate button */
#tm-pretranslate-btn {
    position: relative;
}

#tm-pretranslate-btn:hover {
    background-color: var(--bs-success);
    color: white;
    border-color: var(--bs-success);
}

#tm-pretranslate-btn i {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Auto-translated cells highlight - Match type specific styles */

/* Exact match (100%, 101%, 102%) - Green theme */
.tm-auto-translated,
.tm-auto-translated-exact {
    background-color: rgba(25, 135, 84, 0.1) !important;  /* Light green background */
    border-left: 3px solid var(--bs-success) !important;   /* Green left border */
}

.tm-auto-translated:hover,
.tm-auto-translated-exact:hover {
    background-color: rgba(25, 135, 84, 0.15) !important;
}

/* Fuzzy match (75-99%) - Orange/Yellow theme */
.tm-auto-translated-fuzzy {
    background-color: rgba(255, 193, 7, 0.1) !important;   /* Light yellow/orange background */
    border-left: 3px solid var(--bs-warning) !important;   /* Orange left border */
}

.tm-auto-translated-fuzzy:hover {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

/* Partial match - Blue theme */
.tm-auto-translated-partial {
    background-color: rgba(13, 110, 253, 0.1) !important;  /* Light blue background */
    border-left: 3px solid var(--bs-info) !important;      /* Blue left border */
}

.tm-auto-translated-partial:hover {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

/* Pre-translate dialog styles */
.tm-pretranslate-dialog {
    max-height: 70vh;
    overflow-y: auto;
    /* 2026-06-17: overflow-y:auto 만 두면 CSS spec 상 overflow-x 도 암시적 auto →
       "행 범위 지정"의 .row 음수 마진 fraction overflow 로 가로 스크롤이 생김. 명시적 차단. */
    overflow-x: hidden;
}

.tm-pretranslate-dialog .alert {
    font-size: 0.9rem;
}

.tm-pretranslate-dialog .form-check {
    margin-bottom: 0.5rem;
}

/* Coverage stats */
.coverage-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--bs-gray-200);
}

.coverage-stat:last-child {
    border-bottom: none;
}

.coverage-progress {
    position: relative;
    height: 30px;
    background-color: var(--bs-gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.coverage-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: width 0.3s ease;
}

.coverage-progress-exact {
    background-color: var(--bs-success);
}

.coverage-progress-fuzzy {
    background-color: var(--bs-warning);
}

.coverage-progress-none {
    background-color: var(--bs-secondary);
}

/* Processing indicator */
.tm-processing {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.tm-processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--bs-success);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}