/* Buttons */

.lapp .btn-success {
  border-color: #556f29;
  background-color: #556f29;
  color: #fff;
}

.btn-danger {
  border-color: #dc2626;
  background-color: #dc2626;
  color: #fff;
}

.lapp button {
  border-color: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

/* Layout */

.lapp-layout {
  display: grid;
  gap: 1rem;
  max-width: 620px;
  margin: 0 auto;
}

.lapp-title {
  color: #0d211a;
  font-size: 1.875rem;
  font-weight: 800;
  font-family: "Playfair";
}

.lapp-login .lapp-title,
.lapp-create_account .lapp-title {
  margin-bottom: 1.5rem;
}

.lapp-subtitle {
  font-size: 1rem;
  font-weight: 600;
}

.lapp-widget {
  border: 1px solid #ddd;
  border-radius: 10px 10px 10px 10px;
  background-color: #fff;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.lapp-widget_title {
  color: #0d211a;
  font-size: 1.75rem;
  font-weight: 800;
  display: block;
}

.lapp-widget_title .label-points {
  font-family: "Pacifico";
}

/* Navigation */

.lapp-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  justify-items: center;
  border-top: 1px solid #ddd;
  background-color: #fff;
  z-index: 1000;
}

.lapp-nav_item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  font-size: 1.125rem;
  color: #0d211a;
  font-weight: 600;
  z-index: 1000;
}

/* Welcome */

.lapp-progress_labels {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.lapp-progress_start {
  opacity: 0.5;
}

.lapp-progress_end {
  opacity: 0.5;
}

.lapp-total_points .progress-bar {
  width: 100%;
  height: 25px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3rem;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background-color: #f39207;
  width: 0;
  transition: width 0.4s ease;
}

.max-points-tooltip .tooltip-text {
  visibility: hidden;
  width: 260px;
  background: #222;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.2s;
  font-size: 13px;
  pointer-events: none;
}

@media (max-width: 600px) {
  .max-points-tooltip .tooltip-text {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    min-width: 220px;
    max-width: 98vw;
  }
}

.spinner {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.spinner .path {
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

.lapp-widget_qr_title {
  font-size: 18px;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
}

/* Rewards */

.lapp-products {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.lapp-product_item {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background-color: #fff;
  border-radius: 10px;
  border: 1px solid #ddd;
  user-select: none;
}

.lapp-product_item:hover {
  background-color: #f8f9fa;
  cursor: pointer;
  color: #f39207;
  transition: all 0.2s ease-in-out;
}

.lapp-product_detail {
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

.lapp-product_detail__img__container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lapp-product_detail__info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lapp-product_detail__description {
  font-size: 0.875rem;
  color: #0d211a;
  font-weight: 600;
}

.lapp-product_title {
  font-family: "Playfair";
  font-weight: 800;
  font-size: 1.25rem;
}

.lapp-product_title__label {
  font-size: 0.725rem;
  font-family: sans-serif;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  background-color: #556f29;
  color: #fff;
  display: inline-block;
  border-radius: 5px;
  text-transform: uppercase;
}

.lapp-product_points {
  text-align: end;
  font-weight: 600;
}

/* System */

.lapp-system_header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lapp-customer_info .bi {
  width: 24px;
  height: 24px;
}

.lapp-widget_balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lapp-widget_balance .bi {
  width: 24px;
  height: 24px;
}

.lapp-system_actions {
  display: grid;
  gap: 1rem;
}

.lapp-system_actions button {
  width: 100%;
}

/* Forms */

.lapp-form {
  display: grid;
  gap: 1rem;
}

.lapp-create_account .lapp-form {
  grid-template-columns: 1fr 1fr;
}

.required {
  color: #dc2626;
}

.lapp-form .form-item_fw {
  grid-column: 1 / -1;
}

.lapp-form label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #0d211a;
}

.lapp-search input[type="text"],
.lapp-form input {
  border: 1px solid #ddd;
}

.lapp-form button {
  width: 100%;
}

.form-text {
  padding: 0.5rem;
  text-align: center;
}

.trans-id {
  font-size: 1rem;
}

/* Modal Backdrop */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  position: relative;
  max-width: 600px;
  margin: auto 1.5rem;
  z-index: 1060;
  width: 100%;
}

.modal-content {
  background-color: #fff;
  border-radius: 0.3rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  font-family: "Playfair";
  font-size: 1.5rem;
  color: #0d211a;
  font-weight: 800;
  margin-bottom: 0;
}

.modal-header button.close {
  border: 0;
  padding: 0.25rem;
  border-radius: 50%;
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
}

.modal-footer .btn {
  margin-left: 0.5rem;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 0.2rem;
  cursor: pointer;
}

.modal-footer .btn-primary {
  background-color: #007bff;
  color: #fff;
}

.modal-footer .btn-secondary {
  background-color: #6c757d;
  color: #fff;
}

.modal.show {
  display: flex;
}

/* Animations */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scanner */

#videoFeed,
#freezedFrame {
  width: 100%;
  max-width: 600px;
  border: 1px solid black;
  display: none;
}

/* Profile */

.lapp-profile {
  display: grid;
  gap: 1rem;
}

.lapp-profile_item {
  background-color: #f8f9fa;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.lapp-profile_item .lapp-profile_value {
  font-weight: 600;
}

.lapp-profile_buttons {
  display: grid;
  gap: 1rem;
}

.full-width {
  width: 100%;
}

.search-input {
  margin-bottom: 1rem;
}

.lapp-history_table {
  width: 100%;
  overflow-x: auto;
}

/* Footer */

.footer-has-copyright {
  display: none;
}

.lapp-notification {
  padding: 1rem;
  border: 1px solid #ffeeba;
  border-radius: 0.25rem;
  background-color: #fff3cd;
  color: #856404;
  font-weight: 600;
}

/* History Timeline */

.lapp-history_table {
  display: flex;
  justify-content: center;
}

.lapp-timeline {
  position: relative;
  padding-left: 20px;
}

.lapp-timeline-item {
  display: flex;
  align-items: center;
  /* <-- This vertically centers the circle */
  position: relative;
  margin-bottom: 30px;
}

.lapp-timeline-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.lapp-timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40px;
  /* same as .lapp-timeline-marker width */
  transform: translateX(-50%);
  width: 4px;
  background: #ccc;
  z-index: 0;
}

.lapp-timeline-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #ccc;
  background: #ccc;
  z-index: 1;
  margin: 8px 0;
}

.lapp-timeline-circle.add {
  background: #4caf50;
  box-shadow: 0 0 0 2px #4caf50;
}

.lapp-timeline-circle.deduct {
  background: #f44336;
  box-shadow: 0 0 0 2px #f44336;
}

.lapp-timeline-content {
  background: #fff;
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
  margin-left: 20px;
  max-width: 400px;
}

.lapp-timeline-date {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.lapp-timeline-points {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
}

.lapp-timeline-points.add {
  color: #4caf50;
}

.lapp-timeline-points.deduct {
  color: #f44336;
}

.lapp-timeline-amount,
.lapp-timeline-cashier,
.lapp-timeline-notes {
  font-size: 13px;
  color: #555;
}

.lapp-timeline-empty {
  color: #888;
  text-align: center;
  padding: 20px 0;
}

/* Verify Email */

.lapp-banner-info {
  display: flex;
  align-items: center;
  background-color: #e7f1ff;
  color: #084298;
  border: 1px solid #b6d4fe;
  border-radius: 4px;
  padding: 16px 20px;
  font-size: 1.1rem;
  margin: 16px auto;
  max-width: 480px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  gap: 14px;
}

.lapp-banner-info-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
}

.lapp-spinner {
  width: 1.5em;
  height: 1.5em;
  border: 0.2em solid #b6d4fe;
  border-top: 0.2em solid #0d6efd;
  border-radius: 50%;
  animation: lapp-spin 0.8s linear infinite;
  margin-right: 10px;
}

@keyframes lapp-spin {
  100% {
    transform: rotate(360deg);
  }
}
