/* Location Autocomplete Modal Styles */

.wagd-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wagd-modal.wagd-modal-open {
  display: flex;
  opacity: 1;
}

.wagd-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.wagd-modal-content {
  position: relative;
  z-index: 2;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.wagd-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wagd-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.wagd-modal-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wagd-detect-live-btn {
  background: linear-gradient(to right, #0073aa, #005a87);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.wagd-detect-live-btn:hover:not(:disabled) {
  background: linear-gradient(to right, #005a87, #004470);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.wagd-detect-live-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wagd-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.wagd-modal-close:hover {
  color: #333;
}

.wagd-modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.wagd-autocomplete-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.wagd-autocomplete-input {
  width: 100%;
  padding: 12px 15px;
  font-size: 14px;
  border: 2px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.wagd-autocomplete-input:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.wagd-suggestions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  background-color: #fff;
}

.wagd-suggestion-item {
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #333;
}

.wagd-suggestion-item:last-child {
  border-bottom: none;
}

.wagd-suggestion-item:hover:not(.wagd-no-results) {
  background-color: #f5f5f5;
}

.wagd-suggestion-item.wagd-no-results {
  cursor: default;
  color: #999;
  text-align: center;
  padding: 20px 15px;
}

.wagd-current-location {
  padding: 12px 15px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  text-align: center;
}

.wagd-current-text {
  margin: 0;
  font-size: 13px;
  color: #666;
}

.wagd-detection-status {
  padding: 15px;
  margin: 15px 15px 0;
  border-radius: 4px;
  background-color: #e8f4f8;
  border-left: 4px solid #0073aa;
  animation: slideDown 0.3s ease;
}

.wagd-detection-status p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wagd-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: #fafafa;
  border-radius: 0 0 8px 8px;
}

.wagd-btn {
  padding: 8px 16px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.wagd-btn-primary {
  background-color: #007cba;
  color: #ffffff;
  border-color: #007cba;
}

.wagd-btn-primary:hover:not(:disabled) {
  background-color: #005a87;
  border-color: #005a87;
}

.wagd-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wagd-btn-secondary {
  background-color: #ffffff;
  color: #333;
  border-color: #ddd;
}

.wagd-btn-secondary:hover {
  background-color: #f5f5f5;
  border-color: #bbb;
}

/* Make location shortcodes clickable/editable */
.wagd-location-editable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #007cba;
  padding: 2px 4px;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.wagd-location-editable:hover {
  background-color: rgba(0, 124, 186, 0.1);
  text-decoration-style: solid;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .wagd-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .wagd-modal-header {
    padding: 15px;
  }

  .wagd-modal-body {
    padding: 15px;
  }

  .wagd-modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
    padding: 12px 15px;
  }

  .wagd-btn {
    width: 100%;
    padding: 10px 12px;
  }

  .wagd-suggestions-list {
    max-height: 150px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .wagd-modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
  }

  .wagd-modal-header {
    border-bottom-color: #444;
  }

  .wagd-modal-header h3 {
    color: #e0e0e0;
  }

  .wagd-modal-close {
    color: #999;
  }

  .wagd-modal-close:hover {
    color: #e0e0e0;
  }

  .wagd-autocomplete-input {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #444;
  }

  .wagd-autocomplete-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
  }

  .wagd-suggestions-list {
    background-color: #1e1e1e;
    border-color: #444;
  }

  .wagd-suggestion-item {
    color: #e0e0e0;
    border-bottom-color: #333;
  }

  .wagd-suggestion-item:hover:not(.wagd-no-results) {
    background-color: #333;
  }

  .wagd-suggestion-item.wagd-no-results {
    color: #888;
  }

  .wagd-current-location {
    background-color: #1e1e1e;
    border-color: #444;
  }

  .wagd-current-text {
    color: #aaa;
  }

  .wagd-modal-footer {
    border-top-color: #444;
    background-color: #1a1a1a;
  }

  .wagd-btn-secondary {
    background-color: #333;
    color: #e0e0e0;
    border-color: #444;
  }

  .wagd-btn-secondary:hover {
    background-color: #444;
    border-color: #555;
  }
}

/* Location Comparison Banner Styles */
.wagd-location-comparison {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.wagd-comparison-content {
  max-width: 800px;
  margin: 0 auto;
}

.wagd-comparison-content p {
  margin: 8px 0;
  font-size: 14px;
}

.wagd-comparison-content strong {
  font-weight: 600;
}

.wagd-comparison-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.wagd-btn-use-browser,
.wagd-btn-dismiss {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.wagd-btn-use-browser {
  background-color: white;
  color: #2196F3;
  flex: 1;
  min-width: 160px;
}

.wagd-btn-use-browser:hover {
  background-color: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wagd-btn-dismiss {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  min-width: 140px;
}

.wagd-btn-dismiss:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Detection Indicator */
#wagd-detection-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

#wagd-detection-indicator p {
  margin: 0;
  font-size: 14px;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.wagd-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Notification Messages */
.wagd-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wagd-notification.wagd-success {
  background-color: #4caf50;
  color: white;
}

.wagd-notification.wagd-error {
  background-color: #f44336;
  color: white;
}

.wagd-notification.wagd-info {
  background-color: #2196f3;
  color: white;
}

.wagd-notification.wagd-fadeout {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .wagd-location-comparison {
    padding: 12px;
  }

  .wagd-comparison-content p {
    font-size: 13px;
  }

  .wagd-comparison-actions {
    flex-direction: column;
  }

  .wagd-btn-use-browser,
  .wagd-btn-dismiss {
    width: 100%;
  }

  #wagd-detection-indicator,
  .wagd-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    margin: auto;
    max-width: calc(100vw - 20px);
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .wagd-location-comparison {
    background: linear-gradient(135deg, #1565C0 0%, #0d47a1 100%);
  }

  .wagd-btn-use-browser {
    background-color: #f5f5f5;
    color: #0d47a1;
  }

  .wagd-btn-use-browser:hover {
    background-color: white;
  }

  #wagd-detection-indicator {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
