/* Typography */
@font-face {
  font-family: 'LittleFriends';
  src: url('assets/LittleFriends.otf') format('opentype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes kvwwiggle {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}

@keyframes wffloaty {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-20px) rotate(var(--r, 0deg)); }
}

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

/* Global Reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  color: #2E2E3A;
  background-color: #F1F1F5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

input:focus, button:focus {
  outline: none;
}

/* Floating Blobs Background */
.blobs-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  opacity: 0.16;
  pointer-events: none;
}

.blob-yellow {
  top: -120px;
  left: -100px;
  width: 420px;
  height: 420px;
  background: linear-gradient(135deg, #FFD538, #FF8A98, #A78FFD);
  border-radius: 48% 52% 63% 37% / 41% 58% 42% 59%;
  --r: -12deg;
  animation: wffloaty 12s ease-in-out infinite;
}

.blob-purple {
  bottom: -160px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: linear-gradient(135deg, #86D3FD, #A78FFD);
  border-radius: 63% 37% 38% 62% / 49% 51% 49% 51%;
  --r: 8deg;
  animation: wffloaty 15s ease-in-out infinite;
}

/* App Layout */
.app-wrapper {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  min-height: 100vh;
}

.diner-card {
  width: 100%;
  max-width: 420px;
  background: #F6F6F8;
  border-radius: 40px;
  box-shadow: 0 40px 90px rgba(20, 20, 30, 0.15), 0 0 0 2px rgba(255, 255, 255, 0.5) inset;
  overflow: hidden;
}

.scrollable-container {
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen {
  padding: 24px clamp(16px, 6vw, 28px);
  animation: fadein 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.screen.hidden {
  display: none !important;
}

/* Header & Logo styling */
.header-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #E3E3E8;
  padding-bottom: 20px;
  margin-left: -28px;
  margin-right: -28px;
  background: #fff;
  margin-top: -24px;
}

.logo-image {
  height: 80px;
}

.logo-swing {
  transform-origin: top center;
  animation: kvwwiggle 2.4s ease-in-out infinite;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  margin: 12px 0 8px;
  color: #2E2E3A;
}

.hero-subtitle {
  color: #5C5C70;
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}

/* Price Badge */
.price-badge-container {
  display: flex;
  justify-content: center;
  margin: 22px 0;
}

.price-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #FFD538;
  border-radius: 48% 52% 63% 37% / 55% 45% 58% 42%;
  width: 124px;
  height: 124px;
  color: #2E2E3A;
  box-shadow: 0 8px 20px rgba(255, 213, 56, 0.3);
}

.price-badge-value {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 1;
}

.price-badge-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 11.5px;
  line-height: 1.3;
  margin-top: 4px;
}

/* Instructions */
.instructions-section {
  margin: 24px 0;
}

.instructions-title {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 14px;
  color: #2E2E3A;
}

.instruction-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.instruction-number {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 48% 52% 63% 37% / 41% 58% 42% 59%;
  color: #2E2E3A;
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.num-yellow { background: #FFD538; }
.num-pink { background: #FF8A98; }
.num-blue { background: #86D3FD; }

.instruction-text {
  font-size: 13.5px;
  color: #5C5C70;
  padding-top: 4px;
}

/* Back button & Screen Header */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.screen-header-title {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: #2E2E3A;
  padding-top: 2px;
}

.btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E3E3E8;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2E2E3A;
  transition: all 0.15s ease;
}

.btn-back:hover {
  background: #F6F6F8;
  transform: scale(1.05);
}

.screen-subtitle {
  font-size: 12.5px;
  color: #5C5C70;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

/* Day Cards */
.days-list {
  margin-bottom: 20px;
}

.day-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  color: #2E2E3A;
  border: 2px solid #E3E3E8;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.day-card.selected {
  border-color: #FFD538;
  background: #FFF7DA;
  box-shadow: 0 6px 16px rgba(255, 213, 56, 0.25);
}

.day-card.disabled {
  background: #F6F6F8;
  cursor: not-allowed;
  opacity: 0.7;
}

.day-checkbox {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #D8D8DF;
  background: #fff;
  transition: all 0.15s ease;
}

.day-card.selected .day-checkbox {
  border-color: #FFD538;
  background: #FFD538;
}

.check-icon {
  stroke: #2E2E3A;
  display: none;
}

.day-card.selected .check-icon {
  display: block;
}

.day-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.day-title {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
}

.day-subtext {
  display: block;
  font-size: 11.5px;
  color: #5C5C70;
}

.day-pill {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.pill-green { background: #E3F9EF; color: #01B766; }
.pill-red { background: #FFE3E6; color: #FF374F; }
.pill-grey { background: #E3E3E8; color: #5C5C70; }

.loading-placeholder {
  text-align: center;
  color: #ABABBA;
  font-size: 14px;
  padding: 30px 0;
}

/* Name Input Fields */
.persons-list {
  margin-bottom: 12px;
}

.person-input-group {
  margin-bottom: 12px;
}

.input-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #5C5C70;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-control {
  flex: 1;
  border: 2px solid #E3E3E8;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  color: #2E2E3A;
  background: #fff;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: #FFD538;
}

.form-control.error {
  border-color: #FF8A98;
}

.btn-remove-person {
  flex: 0 0 auto;
  width: 42px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid #E3E3E8;
  color: #FF374F;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-person:hover {
  background: #FFE3E6;
  border-color: #FF8A98;
}

.btn-dashed-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: 2px dashed #ABABBA;
  border-radius: 14px;
  padding: 12px 15px;
  background: transparent;
  color: #5C5C70;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.btn-dashed-add:hover {
  border-color: #5C5C70;
  color: #2E2E3A;
  background: rgba(255, 255, 255, 0.3);
}

.plus-icon {
  font-size: 16px;
  color: #01B766;
  font-weight: bold;
}

.count-pill-container {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

.count-pill {
  background: #fff;
  border: 1px solid #E3E3E8;
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 12px;
}

/* Warnings and Error styling */
.validation-warning {
  font-size: 11.5px;
  color: #E8722A;
  margin-top: 12px;
  text-align: center;
}

.validation-error {
  font-size: 11.5px;
  color: #FF374F;
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn-primary {
  width: 100%;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: #FFD538;
  color: #2E2E3A;
  box-shadow: 0 8px 20px rgba(255, 213, 56, 0.35);
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 213, 56, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #FBEFB6;
  color: #C9C291;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  width: 100%;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  border: 1.5px solid #D8D8DF;
  border-radius: 14px;
  cursor: pointer;
  background: transparent;
  color: #2E2E3A;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: #ABABBA;
}

.cta-container {
  margin-top: 20px;
}

.sticky-footer {
  background: #F6F6F8;
  border-top: 1px solid #E3E3E8;
  margin-left: -28px;
  margin-right: -28px;
  padding: 14px 28px 4px;
  margin-top: 24px;
}

.summary-text {
  font-size: 12px;
  color: #5C5C70;
  margin-bottom: 8px;
  text-align: center;
}

/* Review Screen specifics */
.review-panel {
  background: #fff;
  border: 1px solid #E3E3E8;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.review-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #ABABBA;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

.review-item {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 3px 0;
}

.review-item-sub {
  color: #5C5C70;
}

.review-divider {
  height: 1px;
  background: #E3E3E8;
  margin: 10px 0;
}

.total-card {
  background: #FFF7DA;
  border: 1px solid #FFE89A;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.total-breakdown {
  font-size: 12px;
  color: #5C5C70;
  margin-bottom: 4px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.total-label {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 16px;
}

.total-value {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 26px;
  color: #2E2E3A;
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #5C5C70;
  margin-bottom: 4px;
}

.terms-warning-card {
  background: #fff;
  border: 1px solid #E3E3E8;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 11.5px;
  color: #5C5C70;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: left;
}

.trust-badges {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.ideal-badge {
  height: 32px;
  display: block;
}

/* Spinner / Processing */
.processing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 5px solid #E3E3E8;
  border-top-color: #00DDA0;
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
}

.processing-title {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 8px 0;
  color: #2E2E3A;
}

.processing-subtitle {
  font-size: 13.5px;
  color: #5C5C70;
  margin: 0;
  max-width: 240px;
}

/* Success Screen */
.success-content {
  text-align: center;
  position: relative;
}

.success-icon-badge-container {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #E8F9F2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(1, 183, 102, 0.15);
}

.success-title {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 38px;
  color: #2E2E3A;
  margin: 0 0 8px;
  line-height: 1;
}

.success-subtitle {
  color: #2E2E3A;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 4px;
}

.success-email-notice {
  color: #5C5C70;
  font-size: 12.5px;
  margin: 0 0 16px;
}

.success-summary-box {
  background: #fff;
  border: 1px solid #E3E3E8;
  border-radius: 18px;
  padding: 14px 16px;
  text-align: left;
  margin-bottom: 16px;
}

.summary-box-title {
  font-size: 11px;
  font-weight: 600;
  color: #ABABBA;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

.success-summary-item {
  font-size: 13.5px;
  padding: 3px 0;
}

.summary-box-divider {
  height: 1px;
  background: #E3E3E8;
  margin: 8px 0;
}

.summary-box-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  font-size: 13.5px;
}

.total-value-success {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #01B766;
}

/* Failed Screen */
.failed-content {
  text-align: center;
  padding: 30px 10px;
}

.failed-icon-badge-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.failed-icon-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #FCF1EA;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(232, 114, 42, 0.15);
}

.failed-title {
  font-family: 'LittleFriends', 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 10px;
  color: #2E2E3A;
}

.failed-subtitle {
  font-size: 13.5px;
  color: #5C5C70;
  line-height: 1.5;
  margin: 0 0 12px;
}

.failed-amount-notice {
  font-size: 12.5px;
  color: #5C5C70;
  margin: 0 0 20px;
}

/* Constraints for Desktop */
@media (max-width: 480px) {
  .app-wrapper {
    padding: 0;
  }
  .diner-card {
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
    box-shadow: none;
  }
  .scrollable-container {
    max-height: 100vh;
  }
}
