/* public/css/loyalty-system.css */

/* General Styles */
.wcls-clean-design {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Cards and Containers */
.wcls-card {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.wcls-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wcls-card-header {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.wcls-card-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.wcls-card-body {
  color: #666;
}

/* Buttons */
.wcls-button {
  display: inline-block;
  padding: 10px 20px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.wcls-button:hover {
  background: #45a049;
  color: #fff;
}

.wcls-button-secondary {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #ddd;
}

.wcls-button-secondary:hover {
  background: #e9ecef;
  color: #333;
}

/* Badges */
.wcls-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.wcls-badge-success {
  background: #d4edda;
  color: #155724;
}

.wcls-badge-warning {
  background: #fff3cd;
  color: #856404;
}

.wcls-badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

/* Progress Bars */
.wcls-progress {
  width: 100%;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.wcls-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  transition: width 0.3s ease;
}

/* Tables */
.wcls-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.wcls-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
}

.wcls-table td {
  padding: 12px;
  border-bottom: 1px solid #e9ecef;
  color: #666;
}

.wcls-table tr:hover {
  background: #f8f9fa;
}

/* Forms */
.wcls-form-group {
  margin-bottom: 20px;
}

.wcls-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.wcls-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.wcls-input:focus {
  outline: none;
  border-color: #4caf50;
}

.wcls-input-error {
  border-color: #dc3545;
}

.wcls-error-message {
  color: #dc3545;
  font-size: 13px;
  margin-top: 5px;
}

/* Notifications */
.wcls-notice {
  padding: 12px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.wcls-notice-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.wcls-notice-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.wcls-notice-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* Grid System */
.wcls-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.wcls-col {
  flex: 1;
  padding: 0 15px;
}

.wcls-col-2 {
  width: 50%;
  padding: 0 15px;
}

.wcls-col-3 {
  width: 33.333%;
  padding: 0 15px;
}

.wcls-col-4 {
  width: 25%;
  padding: 0 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .wcls-col-2,
  .wcls-col-3,
  .wcls-col-4 {
    width: 100%;
  }

  .wcls-table {
    display: block;
    overflow-x: auto;
  }
}

/* My Account Page */
.wcls-account-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.wcls-account-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.wcls-account-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

/* Points Dashboard */
.wcls-points-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.wcls-points-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
}

.wcls-points-card .label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 10px;
}

.wcls-points-card .value {
  font-size: 36px;
  font-weight: bold;
}

/* Tier Badges */
.wcls-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 500;
}

.wcls-tier-badge.bronze {
  background: #cd7f32;
  color: #fff;
}

.wcls-tier-badge.silver {
  background: #c0c0c0;
  color: #333;
}

.wcls-tier-badge.gold {
  background: #ffd700;
  color: #333;
}

.wcls-tier-badge.platinum {
  background: #e5e4e2;
  color: #333;
}

/* Gift Card Display */
.wcls-gift-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  padding: 30px;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.wcls-gift-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.1) 10px,
    rgba(255, 255, 255, 0.1) 20px
  );
  transform: rotate(45deg);
  pointer-events: none;
}

.wcls-gift-card-number {
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-family: monospace;
}

.wcls-gift-card-balance {
  font-size: 32px;
  font-weight: bold;
}

/* Loading States */
.wcls-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.wcls-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: wcls-spin 1s linear infinite;
}

@keyframes wcls-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Tooltips */
.wcls-tooltip {
  position: relative;
  display: inline-block;
}

.wcls-tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background: #333;
  color: #fff;
  text-align: center;
  padding: 5px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.wcls-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ---------------------------------------------------------------
   Checkout Discount Boxes (points & gift card)
--------------------------------------------------------------- */

.wcls-checkout-discounts {
  margin: 0 0 20px 0;
}

.wcls-checkout-section {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.wcls-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
  padding: 0;
}

.wcls-available-info {
  font-size: 13px;
  color: #555;
  margin: 0 0 10px 0;
}

.wcls-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.wcls-input-row input[type="number"],
.wcls-input-row input[type="text"] {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.wcls-input-row input:focus {
  border-color: #4caf50;
  outline: none;
}

.wcls-input-row .button {
  white-space: nowrap;
  padding: 8px 16px;
  font-size: 13px;
}

.wcls-preview-text {
  font-size: 12px;
  color: #666;
  margin: 6px 0 0 0;
}

#wcls-points-preview {
  font-weight: 600;
  color: #4caf50;
}

.wcls-applied-notice {
  font-size: 13px;
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.wcls-remove-btn {
  background: none;
  border: 1px solid #a94442;
  color: #a94442;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.wcls-remove-btn:hover {
  background: #a94442;
  color: #fff;
}

.wcls-inline-message {
  font-size: 13px;
  border-radius: 4px;
  padding: 7px 12px;
  margin-top: 8px;
}

.wcls-msg-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.wcls-msg-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Animation */
@keyframes wcls-slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.wcls-animate-slide {
  animation: wcls-slideIn 0.5s ease forwards;
}
