/* src/public/css/customer.css */
/* 12. 고객 화면(Front-End) - 모바일 퍼스트 반응형. 관리자 화면(style.css)과는 완전히
   분리된 별도 스타일시트이며, 브랜드 컬러만 관리자 화면과 동일하게 맞췄습니다. */

:root {
  --c-bg: #F6F7F9;
  --c-surface: #FFFFFF;
  --c-border: #E2E5EA;
  --c-text: #1B2430;
  --c-text-muted: #6B7280;
  --c-primary: #2C5F8A;
  --c-primary-dark: #20486A;
  --c-primary-soft: #E8F0F7;
  --c-success: #2E7D5B;
  --c-danger: #B3392B;
  --c-radius: 14px;
  --c-shadow: 0 1px 3px rgba(20, 30, 45, 0.08), 0 1px 2px rgba(20, 30, 45, 0.05);
  --c-nav-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #10141A;
    --c-surface: #1A2029;
    --c-border: #2B3340;
    --c-text: #EAEDF1;
    --c-text-muted: #9AA4B2;
    --c-primary: #6FA8D8;
    --c-primary-dark: #8FBCE3;
    --c-primary-soft: #1E2C3A;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.55;
  padding-bottom: calc(var(--c-nav-h) + 12px);
}
a { color: var(--c-primary); text-decoration: none; }
/* 접근성: 문단 등 일반 텍스트 안에 놓인 링크는 색상만으로 구분되지 않도록 밑줄을 유지합니다
   (WCAG 1.4.1 - Use of Color / Lighthouse link-in-text-block). */
.c-hint a, .c-detail-body a, p a { text-decoration: underline; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }

.c-container { max-width: 720px; margin: 0 auto; padding: 12px 16px 24px; }
@media (min-width: 900px) {
  .c-container { max-width: 1080px; padding: 20px 24px 32px; }
}

/* ---------- 상단 헤더 ---------- */
.c-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.c-header-inner {
  max-width: 720px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
@media (min-width: 900px) { .c-header-inner { max-width: 1080px; padding: 12px 24px; } }
.c-logo { font-weight: 800; font-size: 18px; color: var(--c-primary-dark); white-space: nowrap; }
.c-search-form { flex: 1; display: flex; }
.c-search-form input[type="search"] {
  flex: 1; min-width: 0; padding: 9px 14px; border: 1px solid var(--c-border);
  border-radius: 999px 0 0 999px; background: var(--c-bg); color: var(--c-text);
}
.c-search-form button {
  border: 1px solid var(--c-primary); background: var(--c-primary); color: #fff;
  padding: 9px 16px; border-radius: 0 999px 999px 0; cursor: pointer;
}
.c-header-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.c-header-actions a { font-size: 13px; }
.c-desktop-nav { display: none; }
@media (min-width: 900px) {
  .c-desktop-nav { display: flex; gap: 16px; margin-left: 12px; }
  .c-desktop-nav a { font-size: 14px; color: var(--c-text); font-weight: 600; }
}

/* ---------- 하단 탭바 (모바일) ---------- */
.c-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--c-surface); border-top: 1px solid var(--c-border);
  height: var(--c-nav-h);
}
.c-bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--c-text-muted);
}
.c-bottom-nav a.active { color: var(--c-primary); font-weight: 700; }
.c-bottom-nav .icon { font-size: 18px; }
@media (min-width: 900px) { .c-bottom-nav { display: none; } body { padding-bottom: 24px; } }

/* ---------- 카드/그리드 ---------- */
.c-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius);
  padding: 16px; margin-bottom: 14px; box-shadow: var(--c-shadow);
}
.c-card-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.c-card-title .more { font-size: 12px; font-weight: 400; color: var(--c-text-muted); }

.c-widget-row { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.c-widget {
  flex: 0 0 auto; min-width: 120px; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--c-radius); padding: 12px 14px; text-align: center; box-shadow: var(--c-shadow);
}
.c-widget .num { font-size: 18px; font-weight: 800; color: var(--c-primary-dark); }
.c-widget .label { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; }

.c-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .c-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .c-grid { grid-template-columns: repeat(3, 1fr); } }

.c-item {
  display: flex; gap: 12px; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--c-radius); padding: 10px; box-shadow: var(--c-shadow);
}
.c-item img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; flex: none; background: var(--c-bg); }
.c-item .body { min-width: 0; }
.c-item .cat { font-size: 11px; color: var(--c-primary); font-weight: 700; }
.c-item .title { font-size: 14px; font-weight: 700; margin: 3px 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.c-item .meta { font-size: 11px; color: var(--c-text-muted); }

.c-category-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; }
.c-category-row a {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: var(--c-surface);
  border: 1px solid var(--c-border); font-size: 13px; color: var(--c-text); font-weight: 600;
}
.c-category-row a.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ---------- 버튼/폼 ---------- */
.c-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--c-border);
  background: var(--c-surface); color: var(--c-text); font-weight: 700; cursor: pointer; font-size: 14px;
}
.c-btn:hover { text-decoration: none; }
.c-btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.c-btn-block { width: 100%; }
.c-btn-sm { padding: 7px 12px; font-size: 12px; }

.c-field { margin-bottom: 14px; }
.c-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.c-field input, .c-field select, .c-field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--c-border); border-radius: 10px;
  background: var(--c-surface); color: var(--c-text);
}
.c-hint { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }
.c-checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; margin-bottom: 8px; }
.c-checkline input { width: auto; }

.c-alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.c-alert-error { background: #FBEAE7; color: #B3392B; }
.c-alert-success { background: #E5F3ED; color: #2E7D5B; }

.c-empty { text-align: center; color: var(--c-text-muted); padding: 30px 0; font-size: 13px; }

/* ---------- 광고 슬롯 ---------- */
.c-ad { text-align: center; margin: 14px 0; }
.c-ad .label { font-size: 10px; color: var(--c-text-muted); margin-bottom: 4px; }
.c-ad img, .c-ad ins { max-width: 100%; }

/* ---------- 콘텐츠 상세 ---------- */
.c-detail-title { font-size: 20px; font-weight: 800; margin: 4px 0 8px; }
.c-detail-meta { font-size: 12px; color: var(--c-text-muted); margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.c-detail-image { width: 100%; border-radius: var(--c-radius); margin-bottom: 14px; }
.c-detail-body { font-size: 15px; line-height: 1.8; word-break: break-word; }
.c-tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.c-tag { font-size: 12px; background: var(--c-primary-soft); color: var(--c-primary-dark); padding: 4px 10px; border-radius: 999px; }
.c-share-row { display: flex; gap: 8px; margin: 14px 0; }

/* ---------- 캘린더(출석) ---------- */
.c-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.c-calendar .day { padding: 8px 0; border-radius: 8px; font-size: 12px; background: var(--c-bg); }
.c-calendar .day.checked { background: var(--c-primary); color: #fff; font-weight: 700; }
.c-calendar .dow { font-size: 11px; color: var(--c-text-muted); padding-bottom: 4px; }

.c-list-plain { list-style: none; margin: 0; padding: 0; }
.c-list-plain li { padding: 10px 0; border-bottom: 1px solid var(--c-border); font-size: 13px; display: flex; justify-content: space-between; gap: 10px; }
.c-list-plain li:last-child { border-bottom: none; }

.c-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
