:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
  padding-top: 40px;
}

.df-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.df-header {
  text-align: center;
  margin-bottom: 40px;
}

.df-header h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.df-header p {
  color: var(--gray-500);
  font-size: 18px;
}

.df-search {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  background: white;
  padding: 8px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.df-search-wrapper {
  flex: 1;
  position: relative;
}

.df-search input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  font-size: 16px;
  border-radius: 12px;
}

.df-autocomplete-items {
  position: absolute;
  border: 1px solid var(--gray-200);
  border-bottom: none;
  border-top: none;
  z-index: 99;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
  overflow: hidden;
}

.df-autocomplete-items div {
  padding: 12px 16px;
  cursor: pointer;
  background-color: #fff;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.df-autocomplete-items div:hover {
  background-color: var(--gray-100);
}

.autocomplete-active {
  background-color: var(--primary) !important;
  color: #ffffff;
}

.df-search input:focus {
  outline: none;
}

.df-search button {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.df-search button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Result Cards */
.df-results {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.df-card {
  display: flex;
  flex-direction: row;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 24px;
  border: 1px solid var(--gray-100);
  min-height: 200px;
}

.df-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.df-card-image {
  width: 240px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

.df-card-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.df-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.df-card-title {
  margin: 0;
  font-size: 1.25rem;
  color: #003580;
  /* Booking style blue */
  font-weight: 700;
}

.df-card-rating {
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.df-card-meta {
  color: var(--gray-500);
  font-size: 14px;
  margin-top: 4px;
}

.df-card-main {
  display: flex;
  justify-content: space-between;
  flex: 1;
  margin-top: 12px;
}

.df-card-details {
  flex: 1;
}

.df-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  text-align: right;
  gap: 12px;
  min-width: 150px;
}

.df-card-price {
  display: flex;
  flex-direction: column;
}

.df-card-price .amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.df-card-price .period {
  font-size: 12px;
  color: var(--gray-500);
}

.df-savings {
  display: inline-block;
  background: var(--success-100);
  color: var(--success-700);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.df-card-actions {
  display: flex;
  gap: 12px;
}

.df-btn {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.df-btn-primary {
  background: var(--success);
  color: white;
}

.df-btn-primary:hover {
  background: #15803d;
}

.ota-pill {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}

.ota-pill:hover {
  transform: scale(1.1);
}

.airbnb {
  color: white;
  background: #FF5A5F;
}

.booking {
  color: white;
  background: #003580;
}

.df-compact-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.df-compact-info {
  display: flex;
  flex-direction: column;
}

.df-compact-name {
  font-weight: 600;
  color: var(--gray-900);
}

.df-compact-meta {
  font-size: 12px;
  color: var(--gray-500);
}

.df-compact-otas {
  display: flex;
  gap: 8px;
}

.df-btn-secondary:hover {
  background: var(--gray-200);
}

.df-loading {
  text-align: center;
  padding: 60px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.df-error {
  text-align: center;
  color: #dc2626;
  padding: 20px;
  background: #fef2f2;
  border-radius: 12px;
}

/* Debug Log Overlay */
.df-log-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-height: 300px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(8px);
  color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.log-header {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.log-header button {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  cursor: pointer;
}

.log-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.log-entry {
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: pre-wrap;
  word-break: break-all;
}

.log-error {
  color: #f87171;
}

.log-warn {
  color: #fbbf24;
}

.log-request {
  color: #60a5fa;
}

.log-response {
  color: #34d399;
}

.log-debug {
  color: #818cf8;
}

/* Autocomplete Suggestions */
.pac-container {
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  font-family: inherit;
}

.pac-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.pac-item:hover {
  background-color: var(--gray-100);
}

.pac-item-query {
  font-size: 14px;
  color: var(--gray-900);
}

@media (max-width: 600px) {
  .df-log-overlay {
    width: calc(100% - 40px);
    right: 20px;
    bottom: 20px;
  }
}