/* rewards-linking.css — Shared styles for rewards ↔ booking linking UI */

@keyframes rewards-spin {
  to { transform: rotate(360deg); }
}

.rewards-link-results .rotating,
.rewards-linked-booking-card .rotating,
#rewards-link-status-container .rotating {
  animation: rewards-spin 1s linear infinite;
  display: inline-block;
}

/* Modal base — only applied if not already defined by page CSS */
body.modal-open {
  overflow: hidden;
}

.rewards-link-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* Modal overrides */
.rewards-link-modal {
  max-width: 560px;
  width: 95%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.rewards-link-modal .modal-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.rewards-link-modal .modal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rewards-link-modal .modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: #64748b;
  display: flex;
  align-items: center;
}

.rewards-link-modal .modal-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.rewards-link-modal .modal-body {
  overflow-y: auto;
  flex: 1;
}

.rewards-link-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.rewards-link-search-row .form-input {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
}

.rewards-link-search-row .form-input:focus {
  border-color: var(--color-primary, #2b6cb0);
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

/* Search results */
.rewards-link-results {
  max-height: 400px;
  overflow-y: auto;
}

.rewards-link-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.rewards-link-result-card:hover {
  background: #f0f7ff;
  border-color: var(--color-primary, #2b6cb0);
}

.rewards-link-result-main {
  flex: 1;
  min-width: 0;
}

.rewards-link-result-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-header, #1a365d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rewards-link-result-email {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rewards-link-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.rewards-link-result-id {
  font-size: 11px;
  font-family: monospace;
  color: var(--color-text-secondary, #64748b);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.rewards-link-result-tier {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Rewards status section in drawers */
.rewards-status-section {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.rewards-status-linked {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.rewards-status-unlinked {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.rewards-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rewards-status-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-header, #1a365d);
}

.rewards-status-hint {
  font-size: 13px;
  color: var(--color-text-secondary, #64748b);
  margin: 0 0 10px;
}

.rewards-status-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin-bottom: 10px;
}

.rewards-status-row {
  display: flex;
  flex-direction: column;
}

.rewards-status-label {
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rewards-status-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-header, #1a365d);
}

.rewards-status-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

/* Linked bookings list */
.rewards-linked-booking-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: background 0.15s;
}

.rewards-linked-booking-card[style*="pointer"]:hover {
  background: #f0f7ff;
}

.rewards-linked-booking-main {
  flex: 1;
  min-width: 0;
}

.rewards-linked-booking-id {
  font-weight: 600;
  font-size: 13px;
  font-family: monospace;
  color: var(--color-primary, #2b6cb0);
}

.rewards-linked-booking-dates {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
}

.rewards-linked-booking-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.rewards-linked-booking-guest {
  font-size: 12px;
  color: #374151;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Profile rewards account section */
.rewards-account-section {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.rewards-account-linked {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.rewards-account-unlinked {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.rewards-account-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rewards-account-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-header, #1a365d);
}

.rewards-account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.rewards-account-stat {
  text-align: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
}

.rewards-account-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-header, #1a365d);
}

.rewards-account-stat-label {
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rewards-account-actions {
  display: flex;
  gap: 8px;
}

.rewards-account-actions .btn {
  font-size: 12px;
}

/* Profile bookings list (compact) */
.profile-bookings-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-bookings-card:hover {
  background: #f0f7ff;
}

.profile-bookings-card-main {
  flex: 1;
  min-width: 0;
}

.profile-bookings-card-id {
  font-weight: 600;
  font-size: 13px;
  font-family: monospace;
  color: var(--color-primary, #2b6cb0);
}

.profile-bookings-card-dates {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
}

.profile-bookings-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}
