#agent-query-container,
#partner-query-container {
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 6px;
  background: #fafafa;
}

.partner-query-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.partner-query-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

#partner-query-bib,
.partner-query-bib {
  flex: 1 1 220px;
  width: 100%;
  max-width: 400px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

#partner-query-btn {
  background: #0073aa;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

#partner-query-btn:hover {
  background: #005c8a;
}

#partner-query-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.partner-query-denied,
.partner-query-error {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #f0c2c2;
  background: #fff5f5;
  color: #b91c1c;
}

.partner-query-recaptcha {
  margin: 0 0 12px;
}
#agent-query-input {
  width: 100%;
  height: 100px;
  margin-bottom: 10px;
}
#agent-query-btn {
  background: #0073aa;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
}
#agent-query-btn:hover {
  background: #005c8a;
}
#agent-query-loading {
  padding: 15px;
  text-align: center;
  color: #0073aa;
  font-weight: 500;
  margin-bottom: 15px;
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Robot Animation */
.robot-loader {
  display: inline-block;
  font-size: 32px;
  margin-right: 10px;
  animation: robotDance 1s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes robotDance {
  0%, 100% { 
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% { 
    transform: translateY(-8px) rotate(-5deg) scale(1.1);
  }
  50% { 
    transform: translateY(0) rotate(5deg) scale(1);
  }
  75% { 
    transform: translateY(-8px) rotate(-5deg) scale(1.1);
  }
}

.loading-message {
  display: inline-flex;
  align-items: center;
  color: #0073aa;
  font-weight: 500;
  font-size: 16px;
}
#agent-query-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Card Styles */
.aqp-results-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.aqp-result-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.aqp-result-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.aqp-card-header {
  background: linear-gradient(135deg, #0073aa 0%, #005c8a 100%);
  color: #fff;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
}

.aqp-card-body {
  padding: 16px;
}

.aqp-card-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
  justify-content: space-between;
}

.aqp-card-row:last-child {
  border-bottom: none;
}

.aqp-card-label {
  font-weight: 600;
  color: #555;
  flex-shrink: 0;
  padding-right: 12px;
  word-break: break-word;
}

.aqp-card-value {
  color: #333;
  word-break: break-word;
  line-height: 1.5;
  flex: 1;
}

@media (max-width: 600px) {
  .aqp-card-row {
  }
  
  .aqp-card-label {
    padding-right: 0;
    padding-bottom: 4px;
    margin-bottom: 4px;
  }
  
  .aqp-card-value {
    flex: unset;
    text-align: right;
  }
}

/* Kiểm tra voucher */
.aqp-voucher-box {
  margin-top: 20px;
  border-top: 1px dashed #ccc;
  padding-top: 12px;
}

.aqp-voucher-title {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
}

.aqp-voucher-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.aqp-voucher-form select,
.aqp-voucher-form input {
  flex: 1 1 200px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#aqp-voucher-check-btn {
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  cursor: pointer;
}

#aqp-voucher-check-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aqp-voucher-empty {
  color: #888;
  font-style: italic;
}

.aqp-voucher-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: #6b7280;
  color: #fff;
}

.aqp-voucher-unused { background: #10b981; }
.aqp-voucher-used { background: #f59e0b; }
.aqp-voucher-used_up,
.aqp-voucher-expired,
.aqp-voucher-not_found,
.aqp-voucher-inactive { background: #ef4444; }

.aqp-auth-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.aqp-auth-mode input[type="checkbox"] {
  margin: 0;
}

.aqp-auth-summary {
  margin-bottom: 10px;
  color: #374151;
}

.aqp-qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.aqp-qr-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.aqp-qr-modal-title {
  margin: 0 0 16px;
  font-size: 18px;
  color: #111827;
}

.aqp-qr-modal-image {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aqp-qr-modal-image img {
  width: 300px;
  max-width: 100%;
  height: auto;
}

.aqp-qr-modal-loading {
  color: #6b7280;
}

.aqp-qr-modal-url {
  margin-top: 12px;
  font-size: 13px;
  color: #374151;
  word-break: break-all;
}

.aqp-qr-modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.aqp-qr-modal-open,
.aqp-qr-modal-close {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.aqp-qr-modal-open {
  background: #3b82f6;
  color: #fff;
  border: none;
}

.aqp-qr-modal-close {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}
