/* css/style.css */

.hero-banner {
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  min-height: 60vh;
  position: relative;
}

.hero-banner .overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
}

.custom-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  border: none;
  border-radius: 16px;
  padding: 32px;
  background-color: #f8f9fa;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.custom-card img {
  width: 300px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.custom-card .text-content {
  flex: 1;
}

.custom-card .text-content h5 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.custom-card .text-content p {
  margin-bottom: 1.2rem;
  color: #555;
  line-height: 1.6;
  font-size: 1rem;
}

.custom-card .text-content a.btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .custom-card {
    flex-direction: column;
    text-align: center;
  }

  .custom-card img {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }
}

body {
  background-color: #f8f9fa;
}

#loginForm {
  background-color: #ffffff;
}

.keypad .btn {
  font-size: 1.5rem;
  padding: 1rem 0;
}

body {
  background-color: #f8f9fa;
}

.card p {
  margin-bottom: 0.5rem;
}

.card .badge {
  font-size: 0.9rem;
}

body {
  background-color: #f8f9fa;
}

.history-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.history-content {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-details {
  animation: fadeIn 0.3s ease-in-out;
  border-radius: 8px;
}

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

.nav-tabs {
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 1rem;
}

.nav-tabs .nav-link {
  padding: 0.75rem 1.2rem;
  font-size: 1rem;
}

.navbar-nav .nav-link:hover {
  color: #ffc107 !important; /* 예: 노란색 강조 */
}

max-height: 300px;
overflow-y: auto;

.accordion-item {
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.accordion-button {
  background-color: #fff;
  color: #222;
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  background-color: #f4f4f4;
  color: #000;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
}

.accordion-body {
  background-color: #fdf7f1;
  color: #333;
  padding: 1rem 1.25rem;
  border-top: 1px solid #eee;
}

.bg-login-box {
  background-image: url('../images/moamoa.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;     /* or cover */
  background-color: #f9f9f9;    /* 여백 채우기용 */
  border-radius: 12px;
  padding: 2rem;
}

.bg-partner-login-box {
  background-image: url('../images/moamoa-2.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;     /* or cover */
  background-color: #f9f9f9;    /* 여백 채우기용 */
  border-radius: 12px;
  padding: 2rem;
}

.history-details {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

/* 배경 이미지 설정 */
.bg-login-box {
  background: url('../images/moamoa-1.png') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

/* 배경 이미지 설정 */
.bg-partner-login-box {
  background: url('../images/moamoa-2.png') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

/* 배경 어두운 반투명 오버레이 */
/* .bg-login-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* 어두운 투명 배경 */
  z-index: 1;
} */

/* 로그인 폼 디자인 개선 */
#loginForm {
  position: relative;
  z-index: 2;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 1rem;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
  color: #ffc107 !important; /* 예: Bootstrap의 warning 색상 */
  font-weight: bold;
  border-bottom: 2px solid #ffc107;
}

.modal-backdrop:nth-of-type(2) {
  z-index: 1055 !important;
}

#privacyModal {
  z-index: 1060;
}

#commonToast {
  min-width: 280px; /* 모바일에서도 적절한 최소 너비 */
  border-radius: 12px; /* 부드러운 느낌을 위한 곡률 */
}

/* 전체 화면 덮개 */
.stamp-animation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column; /* 세로로 배치 */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.2); /* 배경을 살짝 어둡게 해서 집중도 향상 */
  pointer-events: none;
}

/* 스탬프 본체 */
.stamp-graphic {
  width: 180px;
  height: 180px;
  background-color: rgba(25, 135, 84, 0.9); /* Success Green */
  border: 8px double rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  margin-bottom: 20px; /* 하단 텍스트와 간격 */

  /* 애니메이션 초기 상태 */
  transform: scale(5) rotate(-45deg);
  opacity: 0;
}

/* 하단 정보 텍스트 스타일 */
.stamp-info-text {
  color: #198754;
  font-size: 1.5rem;
  font-weight: 800;
  background: white;
  padding: 10px 25px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(20px);
}

/* 애니메이션 효과 */
@keyframes stamp-bang-new {
  0% { transform: scale(5) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1) rotate(-15deg); opacity: 1; }
  100% { transform: scale(1) rotate(-15deg); opacity: 1; }
}

@keyframes fade-up-info {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-stamp-active {
  animation: stamp-bang-new 0.5s ease-in forwards;
}

.animate-info-active {
  animation: fade-up-info 0.5s ease-out 0.4s forwards; /* 도장 찍힌 후 등장 */
}

/* 1. 기본 상태 및 포커스(클릭 후 잔상) 강제 초기화 */
.keypad-btn,
.keypad-btn:focus,
.keypad-btn:focus-visible {
    background-color: transparent !important; /* 배경 투명하게 고정 */
    color: #6c757d !important; /* 부트스트랩 secondary 색상 */
    box-shadow: none !important; /* 테두리 광채 제거 */
    transition: all 0.1s;
}

/* 2. 클릭/터치하고 있는 '찰나'의 상태 - 가장 아래에 배치하여 우선순위 확보 */
.keypad-btn:active {
    background-color: #6c757d !important; /* 누를 때만 회색으로! */
    color: white !important; /* 글자는 흰색으로! */
    transform: scale(0.92); /* 쫀득하게 눌리는 효과 */
}

/* 3. (추가) 전체삭제/백스페이스 버튼도 동일하게 적용하고 싶다면 클래스 추가 */
#clearBtn:active, #backspaceBtn:active {
    opacity: 0.8;
    transform: scale(0.92);
}

#saveBtn:active, #queryBtn:active, #useBtn:active {
    opacity: 0.8;
    transform: scale(0.92);
}


/* 1. 기본 상태 및 포커스(클릭 후 잔상) 강제 초기화 */
.use-keypad,
.use-keypad:focus,
.use-keypad:focus-visible {
    background-color: transparent !important; /* 배경 투명하게 고정 */
    color: #6c757d !important; /* 부트스트랩 secondary 색상 */
    box-shadow: none !important; /* 테두리 광채 제거 */
    transition: all 0.1s;
}

/* 2. 클릭/터치하고 있는 '찰나'의 상태 - 가장 아래에 배치하여 우선순위 확보 */
.use-keypad:active {
    background-color: #6c757d !important; /* 누를 때만 회색으로! */
    color: white !important; /* 글자는 흰색으로! */
    transform: scale(0.92); /* 쫀득하게 눌리는 효과 */
}
