/* Smart Voucher - Frontend Styles */

/* === Product Page Custom Fields === */
.sv-custom-fields {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.sv-fields-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sv-fields-title .material-icons {
  font-size: 1.2rem;
}

.sv-buyer-info {
  font-size: 0.875rem;
}

.sv-field-group {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.sv-field-group .form-group {
  margin-bottom: 0.5rem;
}

.sv-field-group .form-group:last-child {
  margin-bottom: 0;
}

.sv-field-group label {
  font-weight: 600;
  font-size: 0.875rem;
}

.sv-availability-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === Cart Summary === */
.sv-cart-summary {
  margin-top: 1rem;
}

.sv-cart-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.sv-cart-item .table-sm td {
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
}

.sv-item-header td {
  background: #f8f9fa;
}

/* === Order Confirmation === */
.sv-order-confirmation {
  border-left: 4px solid #28a745;
}

/* === Validation Page === */
.sv-validation-page {
  max-width: 700px;
  margin: 1rem auto;
}

/* --- Status Banner (prominent, large) --- */
.sv-status-banner {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  min-height: 100px;
}

.sv-status-banner__icon {
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.sv-status-banner__icon .material-icons {
  font-size: 4rem;
}

.sv-status-banner__text h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.sv-status-banner__text p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}

/* Valid (green) */
.sv-status-banner--valid {
  background: #d4edda;
  border: 2px solid #28a745;
  color: #155724;
}
.sv-status-banner--valid .material-icons {
  color: #28a745;
}

/* Redeemed / Already picked up (red) */
.sv-status-banner--redeemed {
  background: #f8d7da;
  border: 2px solid #dc3545;
  color: #721c24;
}
.sv-status-banner--redeemed .material-icons {
  color: #dc3545;
}

/* Expired (yellow/orange) */
.sv-status-banner--expired {
  background: #fff3cd;
  border: 2px solid #ffc107;
  color: #856404;
}
.sv-status-banner--expired .material-icons {
  color: #e0a800;
}

/* Cancelled (grey) */
.sv-status-banner--cancelled {
  background: #e2e3e5;
  border: 2px solid #6c757d;
  color: #383d41;
}
.sv-status-banner--cancelled .material-icons {
  color: #6c757d;
}

/* --- Data Card --- */
.sv-data-card {
  margin-bottom: 1.5rem;
}

.sv-data-table {
  margin-bottom: 0;
}

.sv-data-table td {
  padding: 0.6rem 1rem;
  vertical-align: middle;
}

.sv-data-label {
  font-weight: 600;
  color: #555;
  width: 40%;
  white-space: nowrap;
}

.sv-data-table code {
  font-size: 0.85rem;
  background: #f1f1f1;
  padding: 2px 6px;
  border-radius: 3px;
}

/* --- PIN Form --- */
.sv-pin-card {
  margin-bottom: 1.5rem;
  border: 2px solid #28a745;
}

.sv-pin-form__row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sv-pin-input {
  width: 120px;
  height: 56px;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.3em;
  border: 2px solid #ced4da;
  border-radius: 8px;
  padding: 0.25rem;
}

.sv-pin-input:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
  outline: none;
}

.sv-pin-submit {
  height: 56px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
}

.sv-pin-submit .material-icons {
  font-size: 1.4rem;
}

/* --- Pickup Info Card --- */
.sv-pickup-info-card {
  margin-bottom: 1.5rem;
  border-left: 4px solid #dc3545;
}

.sv-pickup-info-card h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #dc3545;
  margin-bottom: 0.75rem;
}

/* --- Success notice --- */
.sv-success-notice {
  margin-bottom: 1.5rem;
}

/* === Report Page === */
.sv-report-page .card-header {
  background: #f8f9fa;
}

.sv-report-table th {
  white-space: nowrap;
}

/* === Voucher List (Customer Account) === */
.sv-voucher-list .table code {
  font-size: 0.8rem;
  background: #f1f1f1;
  padding: 2px 4px;
  border-radius: 3px;
}

/* === Responsive === */
@media (max-width: 576px) {
  .sv-status-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .sv-status-banner__icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .sv-status-banner__icon .material-icons {
    font-size: 3rem;
  }

  .sv-status-banner__text h2 {
    font-size: 1.3rem;
  }

  .sv-data-label {
    width: auto;
  }

  .sv-pin-form__row {
    flex-direction: column;
  }

  .sv-pin-input {
    width: 100%;
    max-width: 200px;
  }
}
