/* ==========================================================
   generator.css - 완전 조합기(814만) 전용 스타일시트
   (generator.html 연계 스타일)
   ========================================================== */

/* 완전 조합기 추가/보조 스타일 정의 필요 시 확장 가능 */
.generator-split-container {
  width: 100%;
}

/* 사용자 지정 조건 번호 입력창 및 인풋 필드 배경색 유지 (흰색 배경 방지) */
.custom-filter-nums,
.custom-filter-nums:focus,
.custom-filter-nums:active,
.custom-filter-min,
.custom-filter-max {
  background-color: rgba(10, 15, 29, 0.95) !important;
  color: #F8FAFC !important;
  -webkit-text-fill-color: #F8FAFC !important;
}

.custom-filter-nums:focus {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3) !important;
}

/* 브라우저 자동완성(Autofill) 시 흰색/노란색 배경 강제 덮어쓰기 방지 */
.custom-filter-nums:-webkit-autofill,
.custom-filter-nums:-webkit-autofill:hover,
.custom-filter-nums:-webkit-autofill:focus,
.custom-filter-nums:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #0a0f1d inset !important;
  box-shadow: 0 0 0 1000px #0a0f1d inset !important;
  -webkit-text-fill-color: #F8FAFC !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================================
   [UX 리뉴얼] 의미 기반 7개 서브탭 & 실시간 활성 조건 배지
   ========================================================== */
.filter-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-subnav .filter-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  font-size: 12.5px;
  white-space: nowrap;
}

.subnav-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7DD3FC;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
}

.filter-subnav-btn.active .subnav-active-badge {
  background: #38BDF8;
  color: #0F172A;
  border-color: #7DD3FC;
}

/* 실시간 적용 중인 조건 요약 바 */
.active-filters-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.summary-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.summary-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: #7DD3FC;
  white-space: nowrap;
  margin-right: 4px;
}

.summary-bar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.summary-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #E2E8F0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.summary-filter-tag:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38BDF8;
  transform: translateY(-1px);
}

.summary-filter-tag .tag-cat {
  color: #38BDF8;
  font-weight: 700;
}

/* ==========================================================
   [UX 디테일 1] 그룹수 대상 번호 접기/펼치기 버튼 & 프리뷰
   ========================================================== */
.btn-toggle-balls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94A3B8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle-balls:hover,
.btn-toggle-balls.is-open {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38BDF8;
}

/* ==========================================================
   [UX 디테일 2] 분법(3·5·9·15분법) 미니 탭 스위처
   ========================================================== */
.partition-mini-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
  padding: 2px 3px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
}

.part-mini-tab {
  min-width: 54px;
  padding: 2px 9px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: #94A3B8;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}

.part-mini-tab:hover {
  color: #E2E8F0;
  background: rgba(255, 255, 255, 0.04);
}

.part-mini-tab.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38BDF8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================
   [마킹예시 버튼 & 실제 로또 OMR 용지 마킹 모달]
   ========================================================== */
.compact-ticket-card {
  justify-content: space-between !important;
  padding: 10px 14px !important;
  gap: 10px !important;
}

.btn-omr-marking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.2) 0%, rgba(190, 18, 60, 0.32) 100%);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #FDA4AF;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.btn-omr-marking:hover {
  background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  border-color: #FB7185;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.38);
}

.btn-omr-marking:active {
  transform: translateY(0);
}

/* OMR 마킹 모달 백드롭 */
.omr-marking-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

.omr-marking-modal-box {
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  background: #0F172A;
  border: 1px solid rgba(244, 63, 94, 0.38);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
}

.omr-marking-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  background: linear-gradient(135deg, rgba(136, 19, 55, 0.45) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-bottom: 1px solid rgba(244, 63, 94, 0.25);
}

.omr-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.omr-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 6px;
  background: #E11D48;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.omr-modal-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: -0.3px;
}

.btn-omr-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  flex-shrink: 0;
}

.btn-omr-modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #EF4444;
  color: #FFFFFF;
}

.omr-marking-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.omr-selected-balls-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-sizing: border-box;
}

.omr-selected-label {
  font-size: 12px;
  font-weight: 700;
  color: #FDA4AF;
}

.omr-selected-balls-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.omr-slip-preview-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
}

.omr-slip-preview-img {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: block;
  user-select: none;
  -webkit-touch-callout: default;
}

.omr-save-guide-tip {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #94A3B8;
  text-align: center;
  word-break: keep-all;
}

.omr-save-guide-tip strong {
  color: #FDA4AF;
}

.omr-marking-modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-omr-download {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
  transition: all 0.2s;
}

.btn-omr-download:hover {
  background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.55);
}

.btn-omr-close-sub {
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-omr-close-sub:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

@media (max-width: 520px) {
  .compact-ticket-card {
    padding: 9px 10px !important;
    gap: 6px !important;
  }
  .compact-ticket-card .ticket-game-badge {
    min-width: 36px;
    padding: 4px 7px;
    font-size: 12px;
  }
  .compact-ticket-card .ticket-balls {
    gap: 5px;
  }
  .compact-ticket-card .result-ball {
    width: 31px;
    height: 31px;
    font-size: 12.5px;
  }
  .btn-omr-marking {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* 마킹 예시 모달 창 표시 보장 */
#omrMarkingModal.omr-marking-modal-backdrop {
  z-index: 99999 !important;
}


