@import '../../utils/shared-styles.scss';

/* ===== MOBILE FIRST BASE ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;

  @media (min-width: 768px) {
    padding: 0 1.5rem;
  }
}

.booking-page {
  padding: 1.5rem 0 3rem;
  min-height: 100vh;

  @media (min-width: 768px) {
    padding: 3rem 0;
  }
}

/* ===== HERO ===== */
.booking-hero {
  text-align: center;
  margin-bottom: 2rem;
  display: grid;
  gap: 0.75rem;

  @media (min-width: 768px) {
    margin-bottom: 3rem;
    gap: 1rem;
  }

  .hero-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);

    @media (min-width: 768px) {
      width: 80px;
      height: 80px;
    }

    .material-symbols-outlined {
      font-size: 36px;
      color: white;

      @media (min-width: 768px) {
        font-size: 48px;
      }
    }
  }

  h1 {
    font-size: 1.75rem;
    font-weight: 900;
    color: $color-text-primary;
    margin: 0;

    @media (min-width: 768px) {
      font-size: clamp(2rem, 4vw, 3rem);
    }
  }

  .hero-facts {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;

    @media (min-width: 768px) {
      gap: 2rem;
      margin-top: 0.5rem;
    }

    .fact-item {
      display: flex;
      align-items: center;
      gap: 0.375rem;
      font-size: 0.8125rem;
      font-weight: 600;
      color: $color-text-primary;

      @media (min-width: 768px) {
        gap: 0.5rem;
        font-size: 0.9375rem;
      }

      .material-symbols-outlined {
        color: #10b981;
        font-size: 18px;

        @media (min-width: 768px) {
          font-size: 20px;
        }
      }
    }
  }
}

/* ===== STEP INDICATOR (Mobile) ===== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;

  @media (min-width: 1024px) {
    display: none;
  }

  .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;

    .step-number {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: #f1f5f9;
      color: #94a3b8;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 0.875rem;
      transition: all 0.2s ease;
    }

    .step-label {
      font-size: 0.6875rem;
      font-weight: 600;
      color: #94a3b8;
      transition: all 0.2s ease;
      text-align: center;
    }

    &.active {
      .step-number {
        background: linear-gradient(135deg, #2563eb, #3b82f6);
        color: white;
      }

      .step-label {
        color: $color-text-primary;
      }
    }

    &.completed {
      .step-number {
        background: #10b981;
        color: white;
      }

      .step-label {
        color: #10b981;
      }
    }
  }

  .step-divider {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    max-width: 40px;
  }
}

/* ===== STEP BADGE ===== */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 800;
  margin-right: 0.5rem;

  @media (min-width: 1024px) {
    display: none;
  }
}

/* ===== BOOKING GRID ===== */
.booking-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;

  @media (min-width: 768px) {
    gap: 1.5rem;
  }

  @media (min-width: 1024px) {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;

    .step-indicator {
      display: none;
    }
  }
}

/* ===== CALENDAR ===== */
.calendar-section {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);

  @media (min-width: 768px) {
    border-radius: 24px;
    padding: 2rem;
  }

  .section-header {
    margin-bottom: 1rem;

    @media (min-width: 768px) {
      margin-bottom: 1.5rem;
    }

    h2 {
      font-size: 1.25rem;
      font-weight: 800;
      color: $color-text-primary;
      margin: 0;
      display: flex;
      align-items: center;

      @media (min-width: 768px) {
        font-size: 1.5rem;
      }
    }
  }

  .month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;

    @media (min-width: 768px) {
      gap: 1rem;
      margin-bottom: 1.5rem;
    }

    .btn-nav {
      width: 40px;
      height: 40px;
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
      border: 1px solid rgba(37, 99, 235, 0.2);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
      touch-action: manipulation;

      @media (min-width: 768px) {
        width: 36px;
        height: 36px;
      }

      &:active:not(:disabled) {
        transform: scale(0.95);
      }

      &:hover:not(:disabled) {
        background: linear-gradient(135deg, #2563eb, #3b82f6);

        .material-symbols-outlined {
          color: white;
        }
      }

      &:disabled {
        opacity: 0.3;
        cursor: not-allowed;
      }

      .material-symbols-outlined {
        font-size: 24px;
        color: #2563eb;

        @media (min-width: 768px) {
          font-size: 20px;
        }
      }
    }

    .month-label {
      font-size: 1rem;
      font-weight: 700;
      color: $color-text-primary;
      min-width: 140px;
      text-align: center;

      @media (min-width: 768px) {
        font-size: 0.9375rem;
        min-width: 120px;
      }
    }
  }

  .days-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    margin-bottom: 0;

    @media (min-width: 480px) {
      gap: 0.625rem;
      grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }

    @media (min-width: 768px) {
      gap: 0.75rem;
      grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
  }

  .day-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-height: 90px;

    @media (min-width: 768px) {
      padding: 1rem;
      gap: 0.25rem;
      min-height: 100px;
    }

    &:active:not(:disabled) {
      transform: scale(0.97);
    }

    &:hover:not(:disabled) {
      border-color: #3b82f6;
      transform: translateY(-2px);
    }

    &.selected {
      background: linear-gradient(135deg, #2563eb, #3b82f6);
      border-color: #2563eb;

      .day-name,
      .day-number,
      .day-status {
        color: white;
      }
    }

    &.disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .day-name {
      font-size: 0.6875rem;
      font-weight: 600;
      color: $color-text-secondary;
      text-transform: uppercase;

      @media (min-width: 768px) {
        font-size: 0.8125rem;
      }
    }

    .day-number {
      font-size: 1.5rem;
      font-weight: 800;
      color: $color-text-primary;
      line-height: 1;

      @media (min-width: 768px) {
        font-size: 1.5rem;
      }
    }

    .day-status {
      font-size: 0.6875rem;
      font-weight: 600;
      color: #10b981;

      @media (min-width: 768px) {
        font-size: 0.75rem;
      }

      &--full {
        color: #ef4444;
      }
    }
  }

  .slots-section {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 2px solid #e2e8f0;

    @media (min-width: 768px) {
      padding-top: 2rem;
      margin-top: 1.5rem;
    }

    h3 {
      font-size: 1.125rem;
      font-weight: 800;
      color: $color-text-primary;
      margin: 0 0 1rem;
      display: flex;
      align-items: center;

      @media (min-width: 768px) {
        font-size: 1.25rem;
      }
    }

    .slots-grid {
      display: grid;
      gap: 0.625rem;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));

      @media (min-width: 480px) {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      }

      @media (min-width: 768px) {
        gap: 0.75rem;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      }
    }

    .slot-card {
      background: #f8fafc;
      border: 2px solid #e2e8f0;
      border-radius: 12px;
      padding: 0.875rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      cursor: pointer;
      transition: all 0.2s ease;
      font-weight: 700;
      font-size: 0.9375rem;
      color: $color-text-primary;
      white-space: nowrap;
      touch-action: manipulation;

      @media (min-width: 768px) {
        padding: 0.75rem;
      }

      &:active {
        transform: scale(0.97);
      }

      &:hover {
        border-color: #3b82f6;
        background: white;
        transform: translateY(-2px);
      }

      &.selected {
        background: linear-gradient(135deg, #2563eb, #3b82f6);
        border-color: #2563eb;
        color: white;

        .material-symbols-outlined {
          color: white;
        }
      }

      .material-symbols-outlined {
        font-size: 18px;
        color: #2563eb;
      }
    }
  }
}

/* ===== FORM ===== */
.form-section {
  display: grid;
  gap: 1.25rem;
  align-content: flex-start;

  @media (min-width: 768px) {
    gap: 1.5rem;
  }

  .form-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);

    @media (min-width: 768px) {
      border-radius: 24px;
      padding: 2rem;
    }

    .form-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 1.25rem;

      @media (min-width: 768px) {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
      }

      .material-symbols-outlined {
        font-size: 28px;
        color: #2563eb;

        @media (min-width: 768px) {
          font-size: 32px;
        }
      }

      h3 {
        font-size: 1.25rem;
        font-weight: 800;
        color: $color-text-primary;
        margin: 0;

        @media (min-width: 768px) {
          font-size: 1.5rem;
        }
      }
    }
  }

  .booking-form {
    display: grid;
    gap: 1rem;

    @media (min-width: 768px) {
      gap: 1.25rem;
    }

    .form-group {
      display: grid;
      gap: 0.5rem;

      label {
        font-size: 0.875rem;
        font-weight: 700;
        color: $color-text-primary;

        @media (min-width: 768px) {
          font-size: 0.9375rem;
        }
      }

      input,
      textarea {
        padding: 0.875rem 1rem;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        font-size: 1rem;
        font-family: inherit;
        transition: all 0.2s ease;
        -webkit-appearance: none;
        appearance: none;

        @media (min-width: 768px) {
          padding: 0.875rem 1rem;
        }

        &:focus {
          outline: none;
          border-color: #3b82f6;
          box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        &::placeholder {
          color: #94a3b8;
        }
      }

      textarea {
        resize: vertical;
        min-height: 80px;

        @media (min-width: 768px) {
          min-height: 100px;
        }
      }
    }

    .booking-summary {
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.05));
      border: 2px solid rgba(37, 99, 235, 0.15);
      border-radius: 12px;
      padding: 1.25rem;
      margin: 0.5rem 0;

      @media (min-width: 768px) {
        border-radius: 16px;
        padding: 1.5rem;
      }

      .summary-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;

        .material-symbols-outlined {
          font-size: 24px;
          color: #2563eb;
        }

        strong {
          font-size: 1rem;
          color: $color-text-primary;

          @media (min-width: 768px) {
            font-size: 1.0625rem;
          }
        }
      }

      .summary-content {
        display: grid;
        gap: 0.625rem;

        .summary-item {
          display: flex;
          align-items: center;
          gap: 0.625rem;
          font-size: 0.9375rem;
          font-weight: 600;
          color: $color-text-secondary;

          span:first-child {
            font-size: 1.125rem;
            flex-shrink: 0;
          }
        }
      }
    }

    .form-note {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      font-size: 0.8125rem;
      color: $color-text-secondary;
      margin: 0;
      line-height: 1.5;

      @media (min-width: 768px) {
        font-size: 0.875rem;
      }

      .material-symbols-outlined {
        font-size: 18px;
        flex-shrink: 0;
        margin-top: 0.125rem;
      }
    }
  }

  .info-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;

    @media (min-width: 768px) {
      border-radius: 16px;
      padding: 1.5rem;
    }

    h4 {
      font-size: 1rem;
      font-weight: 800;
      color: $color-text-primary;
      margin: 0 0 1rem;

      @media (min-width: 768px) {
        font-size: 1.125rem;
      }
    }

    .info-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: grid;
      gap: 0.75rem;

      li {
        display: flex;
        align-items: flex-start;
        gap: 0.625rem;
        font-size: 0.875rem;
        color: $color-text-secondary;

        @media (min-width: 768px) {
          gap: 0.75rem;
          font-size: 0.9375rem;
        }

        .material-symbols-outlined {
          font-size: 20px;
          color: #2563eb;
          flex-shrink: 0;
          margin-top: 0.125rem;
        }
      }
    }
  }
}

/* ===== STATES ===== */

// Loading State
.loading-state {
  text-align: center;
  padding: 3rem 1.5rem;

  @media (min-width: 768px) {
    padding: 4rem 2rem;
  }

  .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;

    @media (min-width: 768px) {
      width: 48px;
      height: 48px;
      border-width: 4px;
    }
  }

  p {
    color: $color-text-secondary;
    font-weight: 600;
    font-size: 0.9375rem;

    @media (min-width: 768px) {
      font-size: 1rem;
    }
  }
}

// Error Banner
.error-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;

  @media (min-width: 768px) {
    border-radius: 16px;
    padding: 1.5rem;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .material-symbols-outlined {
    font-size: 28px;
    color: #ef4444;
    flex-shrink: 0;

    @media (min-width: 768px) {
      font-size: 32px;
    }
  }

  p {
    margin: 0;
    color: #991b1b;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.5;

    @media (min-width: 768px) {
      font-size: 1rem;
    }
  }
}

// Success Banner
.success-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
  animation: slideDown 0.3s ease;

  @media (min-width: 768px) {
    border-radius: 16px;
    padding: 1.5rem;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .material-symbols-outlined {
    font-size: 28px;
    color: #10b981;
    flex-shrink: 0;

    @media (min-width: 768px) {
      font-size: 32px;
    }
  }

  p {
    margin: 0;
    color: #065f46;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.5;

    @media (min-width: 768px) {
      font-size: 1rem;
    }
  }
}

// Empty State
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;

  @media (min-width: 768px) {
    padding: 4rem 2rem;
  }

  .material-symbols-outlined {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 1rem;

    @media (min-width: 768px) {
      font-size: 80px;
    }
  }

  h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: $color-text-primary;
    margin: 0 0 0.5rem;

    @media (min-width: 768px) {
      font-size: 1.5rem;
    }
  }

  p {
    color: $color-text-secondary;
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;

    @media (min-width: 768px) {
      margin: 0 0 2rem;
      font-size: 1rem;
    }
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
}

// Small Spinner for Button
.spinner-small {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;

  @media (min-width: 768px) {
    width: 20px;
    height: 20px;
  }
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BUTTON STATES ===== */
.btn {
  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  &:active:not(:disabled) {
    transform: scale(0.98);
  }
}

/* ===== ACCESSIBILITY & UX ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

// Improve touch targets on mobile
@media (max-width: 767px) {

  button,
  input,
  select,
  textarea {
    min-height: 44px;
  }
}

// Prevent zoom on input focus (iOS)
@media screen and (max-width: 767px) {

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    font-size: 16px;
  }
}

/* ===== SUCCESS SCREEN ===== */
.success-screen {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  animation: fadeIn 0.5s ease;

  @media (min-width: 768px) {
    padding: 3rem 1.5rem;
  }

  .success-content {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    padding: 2rem 1.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);

    @media (min-width: 768px) {
      padding: 3rem 2.5rem;
      border-radius: 32px;
    }

    .success-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto 1.5rem;
      background: linear-gradient(135deg, #10b981, #34d399);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
      animation: scaleIn 0.5s ease 0.2s both;

      @media (min-width: 768px) {
        width: 96px;
        height: 96px;
      }

      .material-symbols-outlined {
        font-size: 48px;
        color: white;

        @media (min-width: 768px) {
          font-size: 56px;
        }
      }
    }

    h2 {
      font-size: 1.5rem;
      font-weight: 900;
      color: $color-text-primary;
      margin: 0 0 0.5rem;
      animation: slideUp 0.5s ease 0.3s both;

      @media (min-width: 768px) {
        font-size: 2rem;
      }
    }

    .success-subtitle {
      font-size: 1rem;
      color: $color-text-secondary;
      margin: 0 0 2rem;
      animation: slideUp 0.5s ease 0.4s both;

      @media (min-width: 768px) {
        font-size: 1.125rem;
      }
    }

    .success-details {
      display: grid;
      gap: 1rem;
      margin-bottom: 2rem;
      animation: slideUp 0.5s ease 0.5s both;

      @media (min-width: 480px) {
        grid-template-columns: 1fr 1fr;
      }

      .detail-card {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.05));
        border: 2px solid rgba(37, 99, 235, 0.15);
        border-radius: 16px;
        padding: 1.25rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;

        .material-symbols-outlined {
          font-size: 32px;
          color: #2563eb;
          flex-shrink: 0;
        }

        strong {
          display: block;
          font-size: 0.875rem;
          color: $color-text-secondary;
          margin-bottom: 0.25rem;
        }

        p {
          margin: 0;
          font-size: 1rem;
          font-weight: 700;
          color: $color-text-primary;
        }
      }
    }

    .success-info {
      background: #f8fafc;
      border-radius: 16px;
      padding: 1.5rem;
      margin-bottom: 2rem;
      text-align: left;
      animation: slideUp 0.5s ease 0.6s both;

      h3 {
        font-size: 1rem;
        font-weight: 800;
        color: $color-text-primary;
        margin: 0 0 1rem;
        text-align: center;

        @media (min-width: 768px) {
          font-size: 1.125rem;
        }
      }

      ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        gap: 1rem;

        li {
          display: flex;
          align-items: flex-start;
          gap: 0.75rem;
          font-size: 0.875rem;
          color: $color-text-secondary;
          line-height: 1.5;

          @media (min-width: 768px) {
            font-size: 0.9375rem;
          }

          .material-symbols-outlined {
            font-size: 20px;
            color: #10b981;
            flex-shrink: 0;
            margin-top: 0.125rem;
          }
        }
      }
    }

    .success-actions {
      display: grid;
      gap: 1rem;
      margin-bottom: 1.5rem;
      animation: slideUp 0.5s ease 0.7s both;

      @media (min-width: 480px) {
        grid-template-columns: 1fr 1fr;
      }

      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;

        &--secondary {
          background: white;
          color: $color-text-primary;
          border: 2px solid #e2e8f0;

          &:hover {
            background: #f8fafc;
            border-color: #cbd5e1;
          }
        }
      }
    }

    .success-note {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      font-size: 0.75rem;
      color: $color-text-secondary;
      margin: 0;
      line-height: 1.5;
      text-align: left;
      animation: slideUp 0.5s ease 0.8s both;

      @media (min-width: 768px) {
        font-size: 0.8125rem;
      }

      .material-symbols-outlined {
        font-size: 16px;
        flex-shrink: 0;
        margin-top: 0.125rem;
      }
    }
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* ===== STATES ===== */
/* ===== SUCCESS SCREEN ===== */
.success-screen {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  animation: fadeIn 0.5s ease;

  @media (min-width: 768px) {
    padding: 3rem 1.5rem;
  }

  .success-content {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    padding: 2rem 1.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);

    @media (min-width: 768px) {
      padding: 3rem 2.5rem;
      border-radius: 32px;
    }

    .success-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto 1.5rem;
      background: linear-gradient(135deg, #10b981, #34d399);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
      animation: scaleIn 0.5s ease 0.2s both;

      @media (min-width: 768px) {
        width: 96px;
        height: 96px;
      }

      .material-symbols-outlined {
        font-size: 48px;
        color: white;

        @media (min-width: 768px) {
          font-size: 56px;
        }
      }
    }

    h2 {
      font-size: 1.5rem;
      font-weight: 900;
      color: $color-text-primary;
      margin: 0 0 0.5rem;
      animation: slideUp 0.5s ease 0.3s both;

      @media (min-width: 768px) {
        font-size: 2rem;
      }
    }

    .success-subtitle {
      font-size: 1rem;
      color: $color-text-secondary;
      margin: 0 0 2rem;
      animation: slideUp 0.5s ease 0.4s both;

      @media (min-width: 768px) {
        font-size: 1.125rem;
      }
    }

    .success-details {
      display: grid;
      gap: 1rem;
      margin-bottom: 2rem;
      animation: slideUp 0.5s ease 0.5s both;

      @media (min-width: 480px) {
        grid-template-columns: 1fr 1fr;
      }

      .detail-card {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.05));
        border: 2px solid rgba(37, 99, 235, 0.15);
        border-radius: 16px;
        padding: 1.25rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;

        .material-symbols-outlined {
          font-size: 32px;
          color: #2563eb;
          flex-shrink: 0;
        }

        strong {
          display: block;
          font-size: 0.875rem;
          color: $color-text-secondary;
          margin-bottom: 0.25rem;
        }

        p {
          margin: 0;
          font-size: 1rem;
          font-weight: 700;
          color: $color-text-primary;
        }
      }
    }

    .success-info {
      background: #f8fafc;
      border-radius: 16px;
      padding: 1.5rem;
      margin-bottom: 2rem;
      text-align: left;
      animation: slideUp 0.5s ease 0.6s both;

      h3 {
        font-size: 1rem;
        font-weight: 800;
        color: $color-text-primary;
        margin: 0 0 1rem;
        text-align: center;

        @media (min-width: 768px) {
          font-size: 1.125rem;
        }
      }

      ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        gap: 1rem;

        li {
          display: flex;
          align-items: flex-start;
          gap: 0.75rem;
          font-size: 0.875rem;
          color: $color-text-secondary;
          line-height: 1.5;

          @media (min-width: 768px) {
            font-size: 0.9375rem;
          }

          .material-symbols-outlined {
            font-size: 20px;
            color: #10b981;
            flex-shrink: 0;
            margin-top: 0.125rem;
          }
        }
      }
    }

    .success-actions {
      display: grid;
      gap: 1rem;
      margin-bottom: 1.5rem;
      animation: slideUp 0.5s ease 0.7s both;

      @media (min-width: 480px) {
        grid-template-columns: 1fr 1fr;
      }

      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;

        &--secondary {
          background: white;
          color: $color-text-primary;
          border: 2px solid #e2e8f0;

          &:hover {
            background: #f8fafc;
            border-color: #cbd5e1;
          }
        }
      }
    }

    .success-note {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      font-size: 0.75rem;
      color: $color-text-secondary;
      margin: 0;
      line-height: 1.5;
      text-align: left;
      animation: slideUp 0.5s ease 0.8s both;

      @media (min-width: 768px) {
        font-size: 0.8125rem;
      }

      .material-symbols-outlined {
        font-size: 16px;
        flex-shrink: 0;
        margin-top: 0.125rem;
      }
    }
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* ===== STATES ===== */