/* --- Toss UI Common Styles v1.0 --- */

/* 1. Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100vh;
  height: calc(var(--app-height, 1vh) * 100);
  overflow: hidden;
  background-color: #f2f4f6; /* Toss Gray Background */
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Segoe UI", Roboto, sans-serif;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

/* 2. Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 16px 0 16px;
}

.content-area {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ad-banner {
  width: 100%;
  height: 60px;
  background-color: #e5e8eb;
  border-radius: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b95a1;
  font-size: 14px;
}

/* 3. Components: Card */
.toss-card {
  background-color: #ffffff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.toss-card.active {
  display: flex;
  animation: toss-fade-in-up 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px;
  text-align: left;
}

.card-footer {
  padding: 12px 24px 24px 24px;
  background-color: #fff;
  border-top: 1px solid #f2f4f6;
}
.card-footer.button-group {
  display: flex;
  gap: 10px;
}
.card-footer-simple {
  padding: 12px 24px 24px 24px;
  background-color: #fff;
}

/* 4. Typography */
h1, h2 {
  font-size: 26px;
  font-weight: 700;
  color: #191919;
  margin-bottom: 12px;
  line-height: 1.4;
}
h1 > strong, h2 > strong {
  color: #0070ff;
}
p {
  font-size: 16px;
  color: #6b7684;
  margin-bottom: 32px;
  line-height: 1.5;
}
p > strong {
  color: #4e5968;
  font-weight: 600;
}

/* 5. Components: Buttons */
.btn-primary {
  width: 100%;
  height: 52px;
  background-color: #0070ff;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  border-radius: 14px;
  transition: background-color 0.2s, transform 0.1s;
}
.btn-primary:hover {
  background-color: #0059cc;
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary:disabled {
  background-color: #cdd2d8;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  width: 100%;
  height: 52px;
  background-color: #f2f4f6;
  color: #4e5968;
  font-size: 17px;
  font-weight: 600;
  border-radius: 14px;
  transition: background-color 0.2s, transform 0.1s;
}
.btn-secondary:hover {
  background-color: #e5e8eb;
}
.btn-secondary:active {
  transform: scale(0.98);
}
.btn-secondary:disabled {
  background-color: #f2f4f6;
  color: #cdd2d8;
  cursor: not-allowed;
  transform: none;
}

/* 6. Components: Accordion (Details) */
details {
  margin-top: 20px;
  background-color: #f9fafb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
details[open] {
  background-color: #f2f4f6;
}
summary {
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7684;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "⌄";
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.2s;
}
details[open] summary::after {
  transform: rotate(180deg);
}
.toss-guide-content {
  padding: 0 16px 16px 16px;
  font-size: 13px;
  color: #4e5968;
  line-height: 1.6;
  animation: toss-fade-in 0.3s ease;
}
.toss-guide-content p {
  margin-bottom: 10px;
}
.toss-guide-content strong {
  color: #333d4b;
  background-color: rgba(0, 112, 255, 0.1);
  padding: 0 4px;
  border-radius: 4px;
}

/* 7. Animations */
@keyframes toss-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toss-fade-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toss-scale-up {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
