/**
 * 바코드 섹션 스타일
 * 서비스 점검 페이지의 바코드 기능을 위한 스타일
 */

/* 바코드 섹션 기본 스타일 */
.barcode-section {
  display: none; /* 기본적으로 숨김, 웹뷰에서만 표시 */
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.barcode-section.show {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 바코드 제목 */
.barcode-title {
  font-size: 18px;
  font-weight: 500;
  color: #1e1a3a;
  text-align: center;
  line-height: 24px;
  letter-spacing: -0.64px;
}

/* 바코드 컨테이너 */
.barcode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* 바코드 아이템 */
.barcode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.barcode-item:hover {
  box-shadow: none;
  transform: none;
}

/* 바코드 디스플레이 영역 */
.barcode-display {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.barcode-display canvas {
  max-width: 100%;
  height: auto;
}

.barcode-number {
  font-size: 14px;
  font-weight: 400;
  color: #66707a;
  letter-spacing: 1px;
  text-align: center;
}

/* 로딩 상태 */
.barcode-loading {
  color: #6c757d;
  font-size: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.barcode-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #e9ecef;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 에러 상태 */
.barcode-error {
  color: #dc3545;
  font-size: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.barcode-error::before {
  content: "⚠️";
  font-size: 14px;
}

/* 멤버십 정보 안내 영역 */
.membership-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-radius: 12px;
  margin: 0 0 24px 0;
  text-align: center;
  max-width: 100%;
}
.membership-info h2 {
  font-size: 18px;
  font-weight: 600;
  padding: 8px 0;
}

.membership-info p {
  font-size: 16px;
  font-weight: 400;
  color: #666666;
  line-height: 150%;
  letter-spacing: -0.56px;
  margin: 0;
  width: 100%;
  padding: 24px 20px;
  background: #f4f5f7;
  border-radius: 12px;
  box-sizing: border-box;
}

/* PC 버전 멤버십 섹션 */
@media only screen and (min-width: 1280px) {
  .membership-info {
    display: none !important;
    padding: 0 0 48px 0;
    gap: 24px;
    margin: 0;
  }

  .membership-info p {
    font-size: 18px;
    line-height: 26px;
    letter-spacing: -0.36px;
  }
}

/* 바코드 버튼 */
.barcode-button {
  background: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.barcode-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.barcode-button:hover::before {
  left: 100%;
}

.barcode-button:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.barcode-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 123, 255, 0.3);
}

.barcode-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.barcode-button:disabled::before {
  display: none;
}

/* 성공 상태 */
.barcode-success {
  color: #28a745;
  font-size: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.barcode-success::before {
  content: "✅";
  font-size: 14px;
}

/* 반응형 디자인 */
@media only screen and (min-width: 768px) {
  .barcode-section {
    padding: 0;
    margin: 32px 0;
  }

  .barcode-item {
    max-width: 100%;
    padding: 0;
  }

  .barcode-label {
    font-size: 16px;
  }

  .barcode-button {
    font-size: 16px;
    padding: 12px 24px;
    min-width: 140px;
  }
}

@media only screen and (min-width: 1280px) {
  .barcode-section,
  .barcode-section.show {
    display: none;
  }

  .barcode-container {
    gap: 40px;
  }

  .barcode-item {
    max-width: 100%;
    padding: 0;
  }

  .barcode-title {
    font-size: 28px;
    margin-bottom: 32px;
  }

  .barcode-display {
    min-height: 140px;
    padding: 20px;
  }
}

/* 접근성 개선 */
.barcode-button:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.barcode-display:focus-within {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
  .barcode-section {
    border: none;
  }

  .barcode-item {
    border: none;
  }

  .barcode-display {
    border: none;
  }

  .barcode-button {
    border: 2px solid #007bff;
  }
}

/* 애니메이션 최적화 */
@media (prefers-reduced-motion: reduce) {
  .barcode-section.show {
    animation: none;
  }

  .barcode-item:hover {
    transform: none;
  }

  .barcode-button:hover {
    transform: none;
  }

  .barcode-loading::before {
    animation: none;
  }

  .barcode-button::before {
    display: none;
  }
}
