/* ============================================================
   attendance.css  —  출석체크 이벤트 스타일
   ============================================================ */

/* ── 페이지 래퍼 ─────────────────────────────────────────── */
.att-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ── 페이지 헤더 ─────────────────────────────────────────── */
.att-page-header {
  text-align: center;
  margin-bottom: 28px;
}
.att-page-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.att-page-title i { color: #e6a817; }
.att-page-desc {
  color: #888;
  font-size: 13px;
  margin: 0;
}

/* ── 출석 체크 카드 ──────────────────────────────────────── */
.att-check-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #2a2a4a;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.att-check-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(230,168,23,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.att-streak-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.att-streak-icon {
  font-size: 32px;
  line-height: 1;
}
.att-streak-info {
  text-align: left;
}
.att-streak-num {
  font-size: 40px;
  font-weight: 900;
  color: #e6a817;
  line-height: 1;
}
.att-streak-label {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.att-next-bonus {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 20px;
}
.att-next-bonus span { color: #e6a817; font-weight: 700; }

/* 출석 버튼 */
.att-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.att-btn-active {
  background: linear-gradient(135deg, #e6a817, #ff9500);
  color: #000;
  box-shadow: 0 4px 20px rgba(230,168,23,0.4);
}
.att-btn-active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230,168,23,0.5);
}
.att-btn-done {
  background: #1a3a1a;
  color: #4caf50;
  border: 2px solid #4caf50;
  cursor: default;
}
.att-btn-disabled {
  background: #2a2a2a;
  color: #666;
  border: 2px solid #333;
  cursor: not-allowed;
}

/* ── 스트릭 진행 바 ──────────────────────────────────────── */
.att-streak-section {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.att-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #aaa;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.att-section-title i { color: #e6a817; }

.att-streak-track {
  position: relative;
  height: 8px;
  background: #2a2a2a;
  border-radius: 4px;
  margin: 40px 0 20px;
}
.att-streak-fill {
  height: 100%;
  background: linear-gradient(90deg, #e6a817, #ff9500);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.att-milestone {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.att-milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #333;
  border: 2px solid #555;
  transition: all 0.3s;
}
.att-milestone-done .att-milestone-dot {
  background: #e6a817;
  border-color: #e6a817;
  box-shadow: 0 0 8px rgba(230,168,23,0.6);
}
.att-milestone-label {
  position: absolute;
  bottom: 18px;
  font-size: 10px;
  color: #888;
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
}
.att-milestone-done .att-milestone-label { color: #e6a817; }
.att-milestone-label span { font-size: 9px; display: block; }

/* ── 달력 ────────────────────────────────────────────────── */
.att-calendar-section {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.att-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.att-cal-weekday {
  text-align: center;
  font-size: 11px;
  color: #666;
  padding: 4px 0;
  font-weight: 600;
}

.att-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.att-cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #1a1a1a;
  border: 1px solid #222;
  font-size: 12px;
  color: #666;
  transition: all 0.15s;
}
.att-cal-empty {
  background: transparent;
  border-color: transparent;
}
.att-cal-today {
  border-color: #e6a817 !important;
  color: #fff !important;
}
.att-cal-checked {
  background: rgba(76,175,80,0.15) !important;
  border-color: #4caf50 !important;
  color: #4caf50 !important;
}
.att-cal-future {
  opacity: 0.3;
}
.att-cal-day {
  font-size: 12px;
  line-height: 1;
}
.att-cal-check-mark {
  font-size: 10px;
  color: #4caf50;
  line-height: 1;
}
.att-cal-bonus-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #e6a817;
  position: absolute;
  bottom: 3px;
}

/* ── 보상표 ──────────────────────────────────────────────── */
.att-reward-section {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.att-reward-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.att-reward-tbl th {
  background: #1a1a1a;
  color: #888;
  font-weight: 600;
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid #333;
}
.att-reward-tbl td {
  padding: 8px 12px;
  text-align: center;
  color: #ccc;
  border-bottom: 1px solid #1e1e1e;
}
.att-row-bonus td {
  color: #e6a817;
  font-weight: 600;
}
.att-row-special td {
  color: #ff6b35 !important;
  font-weight: 700;
  font-size: 14px;
  background: rgba(255,107,53,0.06);
}

/* ── 보상 팝업 ──────────────────────────────────────────── */
.att-reward-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}
.att-reward-popup {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #e6a817;
  border-radius: 20px;
  padding: 36px 40px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  position: relative;
  animation: attPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes attPopIn {
  from { transform: scale(0.6) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.att-reward-icon {
  font-size: 52px;
  margin-bottom: 12px;
  animation: attIconBounce 0.6s 0.2s both;
}
@keyframes attIconBounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.att-reward-pt {
  font-size: 36px;
  font-weight: 900;
  color: #e6a817;
  margin-bottom: 8px;
}
.att-reward-msg-text {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 6px;
  line-height: 1.5;
}
.att-reward-streak-text {
  font-size: 13px;
  color: #4caf50;
  font-weight: 600;
  margin-bottom: 20px;
}
.att-reward-close {
  background: #e6a817;
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
}
.att-reward-close:hover { transform: scale(1.05); }

/* ── 반응형 ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .att-wrap { padding: 16px 12px 40px; }
  .att-check-card { padding: 20px 16px; }
  .att-streak-num { font-size: 32px; }
  .att-check-btn { padding: 12px 28px; font-size: 15px; }
  .att-cal-cell { font-size: 11px; border-radius: 6px; }
  .att-reward-popup { padding: 28px 24px; }
}

/* ── 헤더 출석체크 버튼 (이벤트 타이머/드랍테이블 버튼과 동일 패턴) ── */
.btn-attendance-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid #4caf50;
  border-radius: 6px;
  color: #4caf50;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-attendance-header:hover {
  background: rgba(76, 175, 80, 0.12);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
  color: #4caf50;
  text-decoration: none;
}
.btn-attendance-header i { font-size: 13px; color: #4caf50; }

/* 오늘 출석 완료 상태 */
.btn-attendance-header.att-done-today {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}

@media (max-width: 520px) {
  .btn-attendance-text { display: none; }
  .btn-attendance-header { padding: 8px 10px; }
}
