.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: 90%;
  max-width: 800px;
  border-radius: 12px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.tab-menu {
  display: flex;
}

.tab-button {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
}

.modal-body {
  margin: 1rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.modal-close {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/**/
/* 테마별 이슈 종목 테이블 */

#tab-favorites {
  width: 70%;
  margin: 0 auto;
}
#favorites-table {
  display: block;         /* overflow가 작동하려면 block 혹은 inline-block 이어야 합니다 */
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.9rem;
  max-height: 500px;
  overflow-y: auto;
}

#favorites-table tbody td {
  padding: 5px;
  border-left: none;
  border-right: none;
  vertical-align: top;
}

/* 테이블 열 폭 지정:
   - 첫 번째 열: 종목 정보 → 50%
   - 두 번째 열: 등락률/가격 → 25%
   - 세 번째 열: 거래량 → 25%
*/
#favorites-table tbody tr td:nth-child(1) {
  width: 45%;
}

#favorites-table tbody tr td:nth-child(2) {
  width: 35%;
}

#favorites-table tbody tr td:nth-child(3) {
  width: 20%;
}

#favorites-table tbody td:nth-child(2) .top-line,
#favorites-table tbody td:nth-child(2) .bottom-line {
  justify-content: flex-end;
}

#favorites-table tbody td:last-child .top-line,
#favorites-table tbody td:last-child .bottom-line {
  justify-content: flex-end;
}

.margin-left {
  margin-left: 10px;
}
