/* === AI ROAD TRIP PLANNER - MODERN UI === */

/* === GLOBAL RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light Theme */
  --rtp-bg-primary: #F8FAFC;
  --rtp-bg-secondary: #FFFFFF;
  --rtp-surface: #FFFFFF;
  --rtp-border: #E2E8F0;
  --rtp-text-primary: #0F172A;
  --rtp-text-secondary: #64748B;
  --rtp-text-muted: #94A3B8;

  /* Brand Colors */
  --rtp-accent: #0d6e8b;
  --rtp-primary: #1B4079;
  --rtp-highlight: #d2fa5c;
  --rtp-success: #10B981;
  --rtp-warning: #F59E0B;
  --rtp-error: #EF4444;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Animations */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
  --rtp-bg-primary: #0A192F;
  --rtp-bg-secondary: #112240;
  --rtp-surface: #1a2a44;
  --rtp-border: #2D3E5F;
  --rtp-text-primary: #F8FAFC;
  --rtp-text-secondary: #CBD5E1;
  --rtp-text-muted: #94A3B8;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* === CONTAINER === */
.rtp-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  background: var(--rtp-bg-primary);
  min-height: 100vh;
  animation: fadeIn var(--transition-smooth);
}

/* === HERO SECTION === */
.rtp-hero {
  text-align: center;
  padding: 3rem 0;
  opacity: 1 !important;
  transform: none !important;
}

.rtp-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--rtp-text-primary);
  background: linear-gradient(135deg, var(--rtp-primary), var(--rtp-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.rtp-hero p {
  font-size: 1.25rem;
  color: var(--rtp-text-secondary);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.rtp-hero .rtp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(13, 110, 139, 0.1), rgba(27, 64, 121, 0.1));
  border: 1px solid var(--rtp-border);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rtp-accent);
  margin-top: 1rem;
}

.rtp-hero .rtp-badge i {
  color: var(--rtp-highlight);
}

/* === LAYOUT === */
.rtp-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 2rem;
  align-items: start;
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 1200px) {
  .rtp-layout {
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .rtp-layout {
    grid-template-columns: 1fr;
  }

  .rtp-builder {
    position: sticky;
    top: 80px;
    z-index: 10;
  }
}

/* === CARDS === */
.rtp-card {
  background: var(--rtp-surface);
  border: 1px solid var(--rtp-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  animation: fadeInUp var(--transition-base);
  animation-fill-mode: both;
}

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

.rtp-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--rtp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rtp-card h2 i {
  font-size: 1.5rem;
  color: var(--rtp-accent);
}

.rtp-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rtp-text-muted);
  margin: 0 0 1rem;
}

/* === FORM ELEMENTS === */
.rtp-form-group {
  margin-bottom: 1.5rem;
}

.rtp-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rtp-text-secondary);
  margin-bottom: 0.5rem;
}

.rtp-form-group input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--rtp-border);
  border-radius: 12px;
  background: var(--rtp-bg-secondary);
  color: var(--rtp-text-primary);
  transition: all var(--transition-base);
}

.rtp-form-group input:focus {
  outline: none;
  border-color: var(--rtp-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 139, 0.1);
}

/* === SECTIONS === */
.rtp-section {
  margin-bottom: 2rem;
}

/* === TOGGLE GROUP (Radio) === */
.rtp-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rtp-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--rtp-bg-secondary);
  border: 2px solid var(--rtp-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.rtp-radio-label:hover {
  border-color: var(--rtp-accent);
  background: rgba(13, 110, 139, 0.03);
}

.rtp-radio-label input[type="radio"] {
  margin-top: 0.125rem;
  width: 20px;
  height: 20px;
  accent-color: var(--rtp-accent);
}

.rtp-radio-label input[type="radio"]:checked + span {
  color: var(--rtp-accent);
  font-weight: 700;
}

.rtp-radio-label span {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--rtp-text-primary);
}

.rtp-radio-label small {
  display: block;
  font-size: 0.8125rem;
  color: var(--rtp-text-muted);
  margin-top: 0.25rem;
  font-weight: 400;
}

/* === CHECKBOX GRID (POI Types) === */
.rtp-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.rtp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--rtp-bg-secondary);
  border: 2px solid var(--rtp-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--rtp-text-secondary);
}

.rtp-checkbox-label:hover {
  border-color: var(--rtp-accent);
  background: rgba(13, 110, 139, 0.03);
}

.rtp-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--rtp-accent);
}

.rtp-checkbox-label input[type="checkbox"]:checked ~ span {
  color: var(--rtp-accent);
  font-weight: 700;
}

.rtp-checkbox-label span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rtp-checkbox-label i {
  font-size: 1.125rem;
}

/* === FORM ELEMENTS === */
.rtp-form-group {
  margin-bottom: 1.5rem;
}

.rtp-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rtp-text-secondary);
  margin-bottom: 0.5rem;
}

.rtp-form-group input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--rtp-border);
  border-radius: 12px;
  background: var(--rtp-bg-secondary);
  color: var(--rtp-text-primary);
  transition: all var(--transition-base);
}

.rtp-form-group input:focus {
  outline: none;
  border-color: var(--rtp-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 139, 0.1);
}

/* === BUTTONS === */
.rtp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.rtp-btn-primary {
  background: linear-gradient(135deg, var(--rtp-primary), var(--rtp-accent));
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}

.rtp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.rtp-btn-primary:active {
  transform: translateY(0);
}

.rtp-btn-secondary {
  background: var(--rtp-bg-secondary);
  color: var(--rtp-text-primary);
  border: 2px solid var(--rtp-border);
}

.rtp-btn-secondary:hover {
  border-color: var(--rtp-accent);
  color: var(--rtp-accent);
}

.rtp-btn-success {
  background: var(--rtp-success);
  color: #FFFFFF;
}

.rtp-btn-block {
  width: 100%;
}

/* === MAP CONTAINER === */
.rtp-map-wrapper {
  position: sticky;
  top: 100px;
  opacity: 1 !important;
  transform: none !important;
}

.rtp-map-container {
  background: var(--rtp-surface);
  border: 1px solid var(--rtp-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 600px;
}

#road-trip-map {
  width: 100%;
  height: 100%;
}

/* === POI SECTION === */
.rtp-poi-section {
  margin-top: 2rem;
  animation: fadeInUp var(--transition-smooth) 0.3s;
  animation-fill-mode: both;
}

.rtp-poi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--rtp-border);
}

.rtp-poi-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--rtp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.rtp-poi-count {
  background: var(--rtp-accent);
  color: #FFFFFF;
  padding: 0.375rem 0.75rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
}

/* === POI GRID === */
.rtp-poi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .rtp-poi-grid {
    grid-template-columns: 1fr;
  }
}

/* === POI CARD === */
.rtp-poi-card {
  background: var(--rtp-surface);
  border: 2px solid var(--rtp-border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  animation: fadeInUp var(--transition-base);
  animation-fill-mode: both;
  position: relative;
  overflow: hidden;
}

.rtp-poi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--rtp-accent);
  transform: scaleY(0);
  transition: transform var(--transition-base);
}

.rtp-poi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--rtp-accent);
}

.rtp-poi-card:hover::before {
  transform: scaleY(1);
}

.rtp-poi-card.active {
  border-color: var(--rtp-accent);
  box-shadow: 0 0 0 4px rgba(13, 110, 139, 0.1);
}

.rtp-poi-card.active::before {
  transform: scaleY(1);
}

.rtp-poi-header-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rtp-poi-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(13, 110, 139, 0.1), rgba(27, 64, 121, 0.1));
  border-radius: 12px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.rtp-poi-info {
  flex: 1;
  min-width: 0;
}

.rtp-poi-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--rtp-text-primary);
  margin: 0 0 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rtp-poi-type {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--rtp-bg-primary);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rtp-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rtp-poi-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rtp-border);
}

.rtp-poi-distance {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rtp-accent);
}

.rtp-poi-distance i {
  font-size: 1rem;
}

.rtp-poi-rating {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rtp-warning);
}

.rtp-poi-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rtp-poi-btn {
  flex: 1;
  padding: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--rtp-border);
  border-radius: 8px;
  background: var(--rtp-bg-secondary);
  color: var(--rtp-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  text-decoration: none;
}

.rtp-poi-btn:hover {
  border-color: var(--rtp-accent);
  color: var(--rtp-accent);
  background: rgba(13, 110, 139, 0.05);
}

/* === ACTIONS BAR === */
.rtp-actions-bar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rtp-surface);
  border: 1px solid var(--rtp-border);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
  animation: fadeInUp var(--transition-smooth) 0.5s;
  max-width: 90%;
}

.rtp-actions-bar.hidden {
  display: none;
}

@media (max-width: 768px) {
  .rtp-actions-bar {
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
    width: calc(100% - 2rem);
    max-width: none;
  }

  .rtp-actions-bar .rtp-btn {
    width: 100%;
  }
}

/* === LOADING STATES === */
.rtp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
}

.rtp-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--rtp-border);
  border-top-color: var(--rtp-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.rtp-loading-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rtp-text-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

/* === EMPTY STATE === */
.rtp-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.rtp-empty-icon {
  font-size: 4rem;
  color: var(--rtp-text-muted);
  margin-bottom: 1rem;
}

.rtp-empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rtp-text-primary);
  margin: 0 0 0.5rem;
}

.rtp-empty-text {
  font-size: 1rem;
  color: var(--rtp-text-secondary);
}

/* === SCROLL REVEAL === */
.rtp-scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rtp-scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .rtp-container {
    padding: 1rem 1rem 6rem;
  }

  .rtp-hero h1 {
    font-size: 2rem;
  }

  .rtp-hero p {
    font-size: 1rem;
  }

  .rtp-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .rtp-map-container {
    height: 400px;
    border-radius: 16px;
  }

  .rtp-checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-base);
}

.modal-content {
  background: var(--rtp-surface);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp var(--transition-base);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--rtp-border);
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rtp-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--rtp-bg-primary);
  border-radius: 8px;
  color: var(--rtp-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--rtp-border);
  color: var(--rtp-text-primary);
}

.modal-body {
  padding: 2rem;
}

.modal-body .form-group {
  margin-bottom: 1.5rem;
}

.modal-body .form-group:last-child {
  margin-bottom: 0;
}

.modal-body label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rtp-text-secondary);
  margin-bottom: 0.5rem;
}

.modal-body .form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--rtp-border);
  border-radius: 12px;
  background: var(--rtp-bg-secondary);
  color: var(--rtp-text-primary);
  transition: all var(--transition-base);
  font-family: inherit;
}

.modal-body .form-control:focus {
  outline: none;
  border-color: var(--rtp-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 139, 0.1);
}

.modal-body textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--rtp-border);
}



/* === SHARE MODAL === */
.rtp-share-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.rtp-share-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--rtp-border);
  border-radius: 0.5rem;
  background: var(--rtp-bg-secondary);
  color: var(--rtp-text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rtp-share-btn:hover {
  background: var(--rtp-bg-tertiary);
  transform: translateX(5px);
}

.rtp-share-btn i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.rtp-share-whatsapp i {
  color: #25D366;
}

.rtp-share-email i {
  color: var(--rtp-accent);
}

.rtp-share-copy i {
  color: var(--rtp-accent-warm);
}

/* === LOAD MORE BUTTON === */
.rtp-poi-list > .rtp-btn-block {
  margin-top: 1rem;
}
