/* Action Tour Guide Support Form - Original Design Styles */

:root {
  --primary-color: #1d4e89;
  --secondary-color: #2e7d32;
  --accent-yellow: #ffc107;
  --danger-color: #dc3545;
  --bg: #f7f9fc;
  --card: #ffffff;
  --muted: #6b7280;
  --border: #e6e8ee;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,.06);
}

/* Font Integration */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Popup Blocker Fallback Styles */
.popup-blocked-fallback {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  border: 2px solid #e74c3c;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  animation: attention-pulse 2s infinite;
  box-shadow: 0 8px 32px rgba(238, 90, 82, 0.3);
}

.popup-blocked-fallback h3 {
  color: white;
  margin: 0 0 16px;
  font-weight: 600;
}

.popup-blocked-fallback p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 20px;
}

.popup-blocked-fallback .btn-fallback {
  background: white;
  color: #e74c3c;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup-blocked-fallback .btn-fallback:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: #c0392b;
}

@keyframes attention-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Form Container */
.atg-form-container {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #222;
  background: var(--bg);
  line-height: 1.65;
  max-width: 1100px;
  margin: 0;
  padding: 24px;
}

.atg-main-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 18px;
}

/* Notice Band */
.atg-notice-band {
  background: #E6F7FF;
  border: 1px solid #B3E0FF;
  border-radius: 10px;
  padding: 16px 18px;
  text-align: center;
  margin-bottom: 20px;
}

.atg-notice-band h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3.5vw, 34px);
  color: var(--primary-color);
}

.atg-notice-band h4 {
  margin: 0;
  color: #3c4257;
  font-weight: 500;
}

/* Form Title */
.atg-form-title {
  font-size: 1.8rem;
  color: var(--primary-color);
  text-align: center;
  font-weight: 700;
  margin: 6px 0 18px;
}

/* Form Sections */
.atg-form-section {
  margin-bottom: 30px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.atg-form-section h4 {
  font-size: 18px;
  margin: 0 0 20px;
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.atg-form-section h4 i {
  color: var(--primary-color);
  width: 24px;
  text-align: center;
}

/* Form Layout */
.atg-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .atg-form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.atg-form-group {
  margin-bottom: 20px;
}

.atg-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

/* Input Styles - Support both original and WordPress classes */
.atg-input, .input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  transition: all 0.2s ease;
  color: #1f2937;
  box-sizing: border-box;
}

.atg-input:focus, .input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.1);
}

.atg-input:invalid, .input:invalid {
  border-color: var(--danger-color);
}

.atg-input::placeholder, .input::placeholder {
  color: #9ca3af;
}

/* Select Styles */
.atg-input select, .input select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Textarea Styles */
.atg-input textarea, .input textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio Options Grid */
.atg-radio-grid, .radio-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.atg-radio-option, .radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.atg-radio-option:hover, .radio-option:hover {
  border-color: var(--primary-color);
  background: #f8fafc;
}

.atg-radio-option input[type="radio"], .radio-option input[type="radio"] {
  margin: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.atg-radio-option input[type="radio"]:checked ~ div, .radio-option input[type="radio"]:checked ~ div {
  color: var(--primary-color);
}

.atg-radio-option.selected, .radio-option.selected {
  border-color: var(--primary-color);
  background: #f0f9ff;
  box-shadow: 0 0 0 1px var(--primary-color);
}

.atg-radio-option div strong, .radio-option div strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 6px;
}

.atg-radio-option div strong i, .radio-option div strong i {
  color: var(--primary-color);
  font-size: 1.1em;
}

.atg-radio-option .atg-muted, .radio-option .muted {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* File Upload */
.atg-input[type="file"], .input[type="file"] {
  padding: 16px;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  cursor: pointer;
  text-align: center;
}

.atg-input[type="file"]:hover, .input[type="file"]:hover {
  border-color: var(--primary-color);
  background: #f0f9ff;
}

/* Small text / helper text */
.atg-muted, .atg-form-group small, .muted {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* Submit Button */
.atg-btn-submit, .btn-submit {
  background: linear-gradient(135deg, var(--primary-color), #2563eb);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 300px;
  margin: 30px auto 0;
  display: block;
  box-shadow: 0 4px 14px rgba(29, 78, 137, 0.3);
}

.atg-btn-submit:hover:not(:disabled), .btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 78, 137, 0.4);
}

.atg-btn-submit:disabled, .btn-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading State */
.atg-btn-submit.loading, .btn-submit.loading {
  position: relative;
  color: transparent;
}

.atg-btn-submit.loading:after, .btn-submit.loading:after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Original CTA Button Styles */
.cta {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, opacity .2s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  font-size: 15px;
}

.cta:active {
  transform: translateY(1px);
}

.cta.success {
  background: linear-gradient(135deg, #2fb344, #1e7a2e);
  color: #fff;
}

.cta.warn {
  background: linear-gradient(135deg, #ffd363, #f3a400);
  color: #212529;
}

.cta.danger {
  background: linear-gradient(135deg, #ef5350, #c62828);
  color: #fff;
}

.cta.full {
  width: 100%;
}

.cta:hover {
  opacity: 0.95;
}

.cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Button variations for compatibility */
.cta.outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--primary-color);
  box-shadow: none;
}

.cta.outline:hover {
  background: var(--bg);
  border-color: var(--primary-color);
}

.cta.secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
  box-shadow: none;
}

.cta.secondary:hover {
  background: #e2e6ea;
  border-color: #dae0e5;
  color: #5a6169;
}

/* Grid System for Platform Section */
.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Platform Warning Styles */
.platform-warning {
  margin: 30px 0;
}

.platform-warning .grid.cards .card {
  border-left: 4px solid var(--danger-color);
}

.platform-warning .card strong {
  color: var(--danger-color);
}

/* Close Button for Platform Panel */
#closePlatformPanel {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

#closePlatformPanel:hover {
  color: #64748b;
  background: #f1f5f9;
}

/* Warning Overlay Styles */
.warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 18, 28, .58);
  display: none !important;
  justify-content: center;
  align-items: center;
  padding: 18px;
  z-index: 55;
}

.warning-overlay.show,
.warning-overlay[style*="display: flex"] {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.warning-panel {
  width: min(820px, 96%);
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
  animation: slideUp 0.3s ease-out;
  overflow-y: auto;
  margin: auto;
}

.warning-buttons {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Validation Styles */
.form-error {
  border: 2px solid var(--danger-color) !important;
  background-color: #fff5f5 !important;
  animation: shake 0.3s ease-in-out;
}

.form-error:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Original class names from standalone version - maintain compatibility */
.form-container {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #222;
  line-height: 1.65;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.form-section {
  margin-bottom: 30px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-section h4 {
  font-size: 18px;
  margin: 0 0 20px;
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* WordPress-specific form styling */
.atg-wp-form {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 20px auto;
  max-width: 1100px;
}

.atg-wp-form .form-container {
  padding: 0;
  margin: 0;
  max-width: none;
}

.atg-wp-form .form-section:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .atg-form-container, .form-container {
    padding: 16px;
  }
  
  .form-row, .atg-form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .atg-main-card {
    padding: 20px;
  }
  
  .atg-form-section, .form-section {
    padding: 20px;
  }
  
  .atg-btn-submit, .btn-submit {
    width: 100%;
    max-width: none;
  }
}

/* Font Awesome Icons */
.fas, .far, .fab {
  margin-right: 8px;
}

/* Special styling for popular choice notice */
.radio-option .muted strong {
  color: var(--secondary-color);
}

/* Hidden elements */
.hidden {
  display: none !important;
}

/* Error and success states */
.error-message {
  color: var(--danger-color);
  font-size: 13px;
  margin-top: 5px;
  display: none;
}

.form-group.has-error .input {
  border-color: var(--danger-color);
}

.form-group.has-error .error-message {
  display: block;
}

.success-message {
  background: #d4fdd4;
  color: #065f46;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  text-align: center;
  border: 1px solid #a7f3d0;
}

/* ATG Message Styles */
#atg-form-messages {
  margin: 20px 0;
}

.atg-success {
  background: #d4fdd4;
  color: #065f46;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
  font-weight: 500;
}

.atg-error {
  background: #fee2e2;
  color: #dc2626;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #fca5a5;
  font-weight: 500;
  position: relative;
}

.atg-error .atg-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #dc2626;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.atg-error .atg-close-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.atg-info {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #93c5fd;
  font-weight: 500;
}

/* File Upload Status Styles */
#file-upload-status .info-status {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  color: #31708f;
}

#file-upload-status .error-status {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}

.atg-help-text {
  margin-top: 6px;
  font-size: 0.9em;
  color: var(--muted);
}

/* File Input Enhancement */
#supportingDocs {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px;
  transition: all 0.3s ease;
  background: var(--bg);
}

#supportingDocs:hover {
  border-color: var(--primary-color);
  background: var(--card);
}

#supportingDocs:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.1);
}

#supportingDocs.error {
  border-color: var(--danger-color);
  background: #fef2f2;
}

