/**
 * settings-alias.css - 헤더 키워드 매핑 전용 스타일
 */
#settingsAliasPanel {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

/* 필드 리스트 테이블 / 행 레이아웃 */
.alias-list-wrap {
    display: flex;
    flex-direction: column;
}

.alias-row {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid #edf2f7;
    background-color: #ffffff;
    transition: background-color 0.15s ease;
}

.alias-row:hover {
    background-color: #fbfcfe;
}

.alias-row:last-child {
    border-bottom: none;
}

/* 좌측 필드 정보 */
.alias-field-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    padding-right: 0.5rem;
    border-right: 1px solid #f1f5f9;
}

.alias-field-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.alias-field-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: #0d6efd;
    background-color: #e7f1ff;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    white-space: nowrap;
}

/* 중앙 키워드 나열 영역 */
.alias-keywords-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    line-height: 1.4;
    color: #334155;
}

.alias-keyword-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease-in-out;
    cursor: default;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.alias-keyword-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.alias-keyword-name {
    font-size: 0.83rem;
    letter-spacing: -0.01em;
}

/* 호버 시 나타나는 삭제 버튼 (가벼운 시각 무게) */
.alias-keyword-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 14px;
    opacity: 0;
    margin-left: 0;
    font-size: 0.85rem;
    font-weight: bold;
    color: #ef4444;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease-in-out;
    overflow: hidden;
    line-height: 1;
}

.alias-keyword-item:hover .alias-keyword-del {
    width: 14px;
    opacity: 0.75;
    margin-left: 0.3rem;
}

.alias-keyword-del:hover {
    opacity: 1 !important;
    background-color: #fee2e2;
}

.alias-no-keywords {
    color: #94a3b8;
    font-size: 0.82rem;
    font-style: italic;
}

/* 우측 액션 / 인라인 입력 영역 */
.alias-action-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.btn-add-alias {
    font-size: 0.76rem;
    font-weight: 600;
    color: #0d6efd;
    background-color: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: 5px;
    padding: 0.2rem 0.55rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-add-alias:hover {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

/* 인라인 입력 폼 */
.alias-inline-form {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: fadeInInline 0.15s ease-out;
}

@keyframes fadeInInline {
    from {
        opacity: 0;
        transform: translateX(4px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alias-inline-input {
    width: 150px;
    height: 27px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
}

.alias-inline-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* 검색 하이라이트 */
.alias-highlight {
    background-color: #fef08a !important;
    color: #854d0e !important;
    font-weight: 700 !important;
    border-radius: 3px;
    padding: 0 2px;
}

/* 반응형 */
@media (max-width: 991px) {
    .alias-row {
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }
    .alias-field-info {
        border-right: none;
        padding-right: 0;
    }
    .alias-keywords-container {
        grid-column: 1 / -1;
        order: 3;
    }
    .alias-action-area {
        order: 2;
    }
}
