/*
Theme Name: TalkTalkSpeech
Theme URI: http://talktalkspeech.mycafe24.com/
Author: TalkTalkSpeech Dev
Author URI: http://talktalkspeech.mycafe24.com/
Description: 톡톡스피치(TalkTalkSpeech) 온라인 영어회화 서비스용 커스텀 테마
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: talktalkspeech
*/

:root {
  --bg: #f7f9ff;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e7ecf5;
  --accent: #3b82f6;
  --accent2: #a78bfa;
  --shadow: 0 12px 30px rgba(20, 40, 90, 0.08);
  --r: 18px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family:
    system-ui,
    -apple-system,
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    sans-serif;
  background: linear-gradient(180deg, var(--bg), #fff);
  color: var(--text);
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

.tts-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tts-nav__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
}
.tts-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 1000;
}
.tts-logo {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.tts-nav__btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.tts-btn--primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.tts-btn:active {
  transform: translateY(1px);
}

.tts-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.tts-pad {
  padding: 16px;
}
.tts-hero {
  padding: 28px 0 16px;
}
.tts-hero h1 {
  margin: 10px 0 8px;
  font-size: 34px;
  letter-spacing: -0.5px;
}
.tts-sub {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 920px) {
  .tts-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.tts-section {
  padding: 18px 0;
}
.tts-h2 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.2px;
}
.tts-muted {
  color: var(--muted);
  font-weight: 800;
}
.tts-hr {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.tts-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(59, 130, 246, 0.06);
  color: #365a9b;
  font-weight: 1000;
  font-size: 13px;
}
.tts-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tts-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 1000;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 18px 40px rgba(20, 40, 90, 0.18);
}
.tts-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.tts-kakao-fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.2px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffe812;
  color: #181600;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}
.tts-kakao-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.tts-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.05);
}
.tts-badge--ok {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.1);
  color: #14532d;
}
.tts-badge--warn {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.1);
  color: #7c2d12;
}
.tts-badge--bad {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.1);
  color: #7f1d1d;
}

/* ===========================
   ✅ 추가 CSS: 시간표 테이블/버튼 깨짐 해결
   =========================== */

.tts-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.tts-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.tts-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  font-size: 13px;
  letter-spacing: -0.2px;
  color: #0f172a;
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.1),
    rgba(167, 139, 250, 0.08)
  );
  border-bottom: 1px solid var(--line);
  padding: 12px 12px;
  white-space: nowrap;
}

.tts-table tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(231, 236, 245, 0.9);
  vertical-align: top;
  font-size: 14px;
}

.tts-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.tts-table tbody tr.is-selected {
  background: rgba(59, 130, 246, 0.08);
}

.tts-td-title {
  font-weight: 1000;
  letter-spacing: -0.1px;
}

.tts-th-actions,
.tts-td-actions {
  width: 220px;
}

.tts-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.tts-actions .tts-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 12px;
  line-height: 1.1;
  white-space: normal; /* 긴 문구 줄바꿈 허용 */
  text-align: center;
}

.tts-actions a.tts-btn {
  display: inline-flex;
}

.tts-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tts-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 520px) {
  .tts-btn {
    width: 100%;
  }
  .tts-nav__btns {
    width: 100%;
  }
  .tts-cta-row .tts-btn {
    width: 100%;
  }
}

/* ===========================
   ✅ 시간표 테이블/버튼 깨짐 해결
   =========================== */

.tts-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.tts-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
}

.tts-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  font-size: 13px;
  letter-spacing: -0.2px;
  color: #0f172a;
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.1),
    rgba(167, 139, 250, 0.08)
  );
  border-bottom: 1px solid var(--line);
  padding: 12px 12px;
  white-space: nowrap;
}

.tts-table tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(231, 236, 245, 0.9);
  vertical-align: top;
  font-size: 14px;
}

.tts-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}
.tts-table tbody tr.is-selected {
  background: rgba(59, 130, 246, 0.08);
}

.tts-td-title {
  font-weight: 1000;
  letter-spacing: -0.1px;
}

.tts-th-actions,
.tts-td-actions {
  width: 240px;
}

.tts-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.tts-actions .tts-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 12px;
  line-height: 1.2;
  white-space: normal; /* 긴 문구 줄바꿈 */
  text-align: center;
}

.tts-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* 모바일에서 버튼 줄정리 */
@media (max-width: 520px) {
  .tts-btn {
    width: 100%;
  }
  .tts-cta-row .tts-btn {
    width: 100%;
  }
}
