@import url('https://fonts.googleapis.com/css2?family=Helvetica+Now+Display:wght@400;700&display=swap');

@font-face {
  font-family: 'Px Grotesk';
  src: url("Px-Grotesk-Regular.ttf") format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Px Grotesk';
  src: url("Px-Grotesk-Bold.ttf") format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Px Grotesk';
  src: url("Px-Grotesk-Regular-Italic.ttf") format('truetype');
  font-weight: 400;
  font-style: italic;
}

:root {
  --background-color: #f2f2f2;
  --card-background-color: #ffffff;
  --primary-color: #070707;
  --chip-background-color: #e6e6e6;
}

html,
body {
  font-family: 'Px Grotesk', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  padding: 48px;
  background-color: var(--background-color);
  box-sizing: border-box;
}

.content-tutorial {
  display: flex;
  margin-top: 1rem;
  margin-bottom: 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.content-tutorial iframe {
  border-radius: 24px;
}

.content-tutorial-video {
  overflow: hidden;
  border-radius: 24px;
  width: 100%;
  height: 100%;
}

.logo {
  width: 112px;
  height: 32px;
}

.bold {
  font-weight: 700;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  max-height: 100%;
  gap: 16px;
  justify-content: space-between;
  box-sizing: border-box;
}

.card-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 16px;
  padding: 24px;
  background-color: var(--card-background-color);
  min-height: 280px;
  min-width: 300px;
  box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.08);
}

.body-small {
  color: var(--primary-color);
  text-align: center;
  margin: 0;
  font-family: 'Px Grotesk';
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
}

.body-extra-small {
  color: var(--primary-color);
  text-align: center;
  font-family: 'Px Grotesk';
  font-size: 14px;
  line-height: 16px;
  letter-spacing: -0.16px;
  font-weight: 400;
  margin: 0;
  font-style: normal;
}

.body-extra-small-bold {
  color: var(--primary-color);
  text-align: center;
  font-family: 'Px Grotesk';
  font-size: 14px;
  line-height: 16px;
  letter-spacing: -0.16px;
  font-weight: 700;
  margin: 0;
  font-style: normal;
}

.money {
  color: var(--primary-color);
  text-align: center;
  font-family: 'Helvetica Now Display', sans-serif;
  font-size: 64px;
  font-style: normal;
  font-weight: 700;
  line-height: 64px;
  padding-top: 1rem;
  margin: 0.5rem 0.5rem;
}

.row {
  display: flex;
  width: 100%;
  gap: 8px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.padding-top-1rem {
  padding-top: 1rem;
}

.store-image {
  width: 120px;
  height: 40px;
  border-radius: 8px;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Px Grotesk';
}

.chip {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: var(--chip-background-color);
  justify-content: center;
  gap: 4px;
}

.chips-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.error-text {
  color: #e74c3c;
  font-size: 14px;
  margin: 0;
  font-weight: 500;
}

.calculator-error {
  margin-top: 8px;
  text-align: center;
}

a {
  text-decoration: none;
}

.button {
  display: flex;
  width: 100%;

  flex-direction: row;
  align-items: center;
  border: none;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 24px;
  background-color: var(--primary-color);
  color: var(--card-background-color);
  gap: 6px;
  cursor: pointer;
  font-size: 16px;
  font-family: 'Px Grotesk';
}

.first-butterfly {
  position: absolute;
  top: -48px;
  left: -70px;
  transform: rotate(-15deg);
}

.col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.calculator-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 4px;
}

.body-small-bold {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Px Grotesk', sans-serif;
  line-height: 16px;
  letter-spacing: -0.14px;
  color: var(--primary-color);
}

.second-butterfly {
  position: absolute;
  bottom: 80px;
  right: -70px;
  scale: 0.8;
  transform: rotate(20deg);
}

.butterfly-image {
  width: 180px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.4));
}

.logo-apple {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.logo-apple-small {
  width: 8px;
  height: 12px;
  object-fit: contain;
}

.link-button {
  padding: 12px 16px;
  background-color: var(--background-color);
  border-radius: 24px;
  border: none;
  color: var(--primary-color);
  font-family: 'Px Grotesk';
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-decoration: none;
  letter-spacing: -0.14px;
  cursor: pointer;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
  .container {
    padding: 24px 16px;
    height: auto;
  }

  .main-content {
    width: 100%;
  }

  .card-container {
    min-width: calc(100% - 32px);
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    padding: 24px 16px;
    box-sizing: border-box;
    margin-left: 16px;
    margin-right: 16px;
    min-height: auto;
  }

  .body-small {
    font-size: 16px;
    line-height: 22px;
    font-weight: 400;
  }

  .button {
    padding: 12px 16px;
  }

  .store-image {
    width: 100px;
    height: 32px;
  }

  .first-butterfly {
    top: -32px;
    left: -40px;
  }

  .second-butterfly {
    bottom: 60px;
    right: -40px;
    scale: 0.8;
  }

  .butterfly-image {
    width: 140px;
    height: 100px;
    filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.4));
  }
}

/* Calculator Styles */
.calculator-container {
  position: fixed;
  top: 0;

  width: 100%;
  height: 100%;
  padding: 24px;
  background-color: var(--background-color);
  display: none; /* Hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  max-width: 402px;
}

.calculator-container.show {
  display: flex;
}

.close-calculator {
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--primary-color);
  align-self: flex-end;

  width: 30px;
  height: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.close-icon {
  font-size: 32px;
  font-weight: 100;
}

.calculator-title {
  flex: 1;
  text-align: center;
  margin-right: 30px;
}

.calculator-title p {
  margin: 0;
  font-family: 'Px Grotesk', sans-serif;
  font-size: 16px;
  line-height: 20px;
  color: var(--primary-color);
}

.calculator-display {
  flex-grow: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.calculator-amount {
  font-family: 'Helvetica Now Display', sans-serif;
  font-size: 72px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  line-height: 1;
}

.calculator-change-btn {
  background-color: var(--primary-color);
  border: none;
  width: 100%;
  border-radius: 16px;
  padding: 16px 32px;
  font-family: 'Px Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--card-background-color);
  cursor: pointer;
  margin-bottom: 16px;
  min-width: 160px;
}

.calculator-change-btn:disabled {
  background-color: #a0a0a0;
  cursor: not-allowed;
}

.calculator-keypad {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 16px;
}

.keypad-row {
  display: flex;
  gap: 0px;
  justify-content: center;
}

.keypad-btn {
  min-width: 134px;
  min-height: 80px;
  width: 100%;
  border: none;
  font-family: 'Px Grotesk', sans-serif;
  line-height: 32px;
  font-size: 24px;
  background-color: var(--background-color);
  font-weight: 400;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.keypad-btn:hover {
  background-color: #e5e5e5;
}

.keypad-btn:active {
  background-color: #d1d1d1;
}

.keypad-backspace {
  background-color: #f8f8f8;
}

.backspace-icon {
  font-size: 24px;
}

/* Mobile responsive for calculator */
@media screen and (max-width: 768px) {
  .calculator-container {
    padding: 0px;
    padding-top: 16px;
    width: 100vw;
    max-width: 100vw;
    padding-right: 16px;
    padding-left: 16px;
  }

  .keypad-btn {
    min-height: 56px;
  }

  .calculator-header {
    margin-bottom: 30px;
    width: 100%;
  }

  .calculator-amount {
    font-size: 56px;
  }

  .calculator-display {
    width: 100%;
  }

  .calculator-keypad {
    max-width: 100%;
  }

  .calculator-title p {
    font-size: 14px;
    line-height: 18px;
  }
}
