/* ═══════════════════════════════════════════════════════════════════
   ADIVA'S HIDEOUT — Innovation Components CSS
   Farm Map, Weather, Tour, Chatbot
   ═══════════════════════════════════════════════════════════════════ */

/* ─── FARM MAP ─── */
.farm-map { position: relative; max-width: 900px; margin: 0 auto; }
.farm-map-svg {
  width: 100%; height: auto; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--white);
  cursor: grab; user-select: none;
}
.farm-map-svg:active { cursor: grabbing; }
.farm-zone { cursor: pointer; transition: opacity 0.2s; }
.farm-zone:hover { opacity: 0.8; }
.farm-zone:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.farm-zone-rect { transition: fill 0.3s, stroke-width 0.3s; }
.farm-zone:hover .farm-zone-rect { fill: rgba(26,122,62,0.2); stroke-width: 0.8; }

.farm-map-panel {
  position: absolute; top: 50%; right: -10px; transform: translate(100%, -50%);
  width: 320px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-xl);
  opacity: 0; pointer-events: none; transition: all 0.3s var(--ease-out);
  z-index: 20;
}
.farm-map-panel.open { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
@media (max-width: 1100px) {
  .farm-map-panel {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    transform: translateY(100%); width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .farm-map-panel.open { transform: translateY(0); }
}
.farm-map-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 28px; height: 28px; border-radius: var(--radius-full);
  background: var(--emerald-50); border: none; font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--muted-fg); transition: all 0.2s;
}
.farm-map-close:hover { background: var(--emerald-100); color: var(--fg); }
.farm-map-panel-header { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 0.75rem; }
.farm-map-panel-icon { font-size: 2rem; }
.farm-map-panel-header h3 { font-size: 1.1rem; margin: 0 0 0.25rem; }
.farm-map-status {
  font-family: 'Inter', sans-serif; font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 0.2rem 0.5rem; color: var(--white);
  border-radius: var(--radius-sm); display: inline-block;
}
.farm-map-panel p { font-size: 0.9rem; color: var(--muted-fg); margin-bottom: 0.75rem; }
.farm-map-panel ul { list-style: none; padding: 0; }
.farm-map-panel li {
  font-size: 0.85rem; color: var(--muted-fg); padding: 0.25rem 0;
  border-bottom: 1px solid var(--emerald-50);
}
.farm-map-panel li::before { content: '✓ '; color: var(--emerald); font-weight: 600; }

/* ─── WEATHER WIDGET ─── */
.weather-widget {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; max-width: 400px;
  margin: 0 auto;
}
.weather-loading { padding: 1rem 0; }
.weather-error { text-align: center; padding: 1.5rem; color: var(--muted-fg); }
.weather-error span { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.weather-current { margin-bottom: 1rem; }
.weather-now { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.weather-icon-large { font-size: 3rem; }
.weather-temp { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; line-height: 1; }
.weather-desc { font-size: 0.9rem; color: var(--muted-fg); }
.weather-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.weather-detail {
  display: flex; justify-content: space-between; font-size: 0.85rem;
  padding: 0.35rem 0; border-bottom: 1px solid var(--emerald-50);
}
.weather-detail-label { color: var(--muted-fg); font-family: 'Inter', sans-serif; font-size: 0.75rem; }
.weather-today {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;
  padding: 0.75rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.weather-forecast { margin-bottom: 0.75rem; }
.weather-forecast-day {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.4rem 0; font-size: 0.85rem;
  border-bottom: 1px solid var(--emerald-50);
}
.weather-forecast-label { width: 40px; font-family: 'Inter', sans-serif; font-size: 0.75rem; color: var(--muted-fg); text-transform: uppercase; }
.weather-forecast-rain { margin-left: auto; font-family: 'Inter', sans-serif; font-size: 0.75rem; color: var(--emerald); }
.weather-location {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: 'Inter', sans-serif; font-size: 0.75rem; color: var(--muted-fg);
  padding-top: 0.5rem; border-top: 1px solid var(--border);
}

/* ─── 360° TOUR ─── */
.tour-viewer { max-width: 800px; margin: 0 auto; }
.tour-viewport {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--emerald-50); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: grab;
  user-select: none; outline: none;
}
.tour-viewport:active { cursor: grabbing; }
.tour-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center;
}
.tour-placeholder-content {
  text-align: center; padding: 2rem; background: rgba(255,255,255,.9);
  border-radius: var(--radius-lg); backdrop-filter: blur(10px);
  max-width: 400px;
}
.tour-placeholder-content h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.tour-placeholder-content p { font-size: 0.9rem; color: var(--muted-fg); }
.tour-panorama {
  position: absolute; inset: 0; width: 200%; height: 100%;
  background: linear-gradient(90deg, var(--emerald-100) 0%, var(--emerald-50) 50%, var(--emerald-100) 100%);
  transition: transform 0.1s ease-out;
}
.tour-controls {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  padding: 0.5rem 1rem; border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
}
.tour-btn {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--emerald); color: var(--white); border: none;
  font-size: 1.2rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all 0.2s;
}
.tour-btn:hover { background: var(--forest); }
.tour-scene-dots { display: flex; gap: 0.4rem; }
.tour-dot {
  width: 8px; height: 8px; border-radius: var(--radius-full);
  background: var(--border); border: none; cursor: pointer;
  transition: all 0.2s;
}
.tour-dot.active { background: var(--emerald); width: 20px; }
.tour-dot:hover { background: var(--emerald-400); }
.tour-scene-label {
  position: absolute; top: 1rem; left: 1rem;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  padding: 0.5rem 1rem; border-radius: var(--radius-full);
  font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 500;
  box-shadow: var(--shadow);
}
.tour-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--emerald); color: var(--white);
  padding: 0.3rem 0.75rem; border-radius: var(--radius-full);
  font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.tour-badge-soon { background: var(--muted-fg); }

/* ─── CHATBOT ─── */
.chatbot { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200; }
.chatbot-toggle {
  width: 56px; height: 56px; border-radius: var(--radius-full);
  background: var(--emerald); color: var(--white); border: none;
  box-shadow: var(--shadow-lg), var(--shadow-emerald);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; transition: all 0.3s var(--ease-spring);
  position: relative;
}
.chatbot-toggle:hover { transform: scale(1.05); }
.chatbot-toggle-icon { font-style: normal; }
.chatbot-badge {
  position: absolute; top: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: var(--radius-full);
  background: #dc2626; color: white; font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-weight: 600;
}

.chatbot-window {
  position: absolute; bottom: 70px; right: 0;
  width: 360px; max-height: 500px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(10px) scale(0.95);
  pointer-events: none; transition: all 0.3s var(--ease-out);
  overflow: hidden;
}
.chatbot-window.open {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 2rem); right: -0.5rem;
    max-height: 70vh;
  }
}

.chatbot-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 1rem 1.25rem; background: var(--forest); color: var(--white);
  font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 500;
}
.chatbot-header-status {
  margin-left: auto; font-size: 0.7rem; color: var(--emerald-300);
  display: flex; align-items: center; gap: 0.3rem;
}
.chatbot-header-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-400); display: inline-block;
}

.chatbot-messages {
  flex: 1; overflow-y: auto; padding: 1rem; display: flex;
  flex-direction: column; gap: 0.75rem; max-height: 300px;
  scroll-behavior: smooth;
}
.chatbot-msg { display: flex; }
.chatbot-msg-bot { justify-content: flex-start; }
.chatbot-msg-user { justify-content: flex-end; }
.chatbot-msg-bubble {
  max-width: 85%; padding: 0.75rem 1rem; border-radius: var(--radius-lg);
  font-size: 0.85rem; line-height: 1.5;
}
.chatbot-msg-bot .chatbot-msg-bubble {
  background: var(--emerald-50); color: var(--fg);
  border-bottom-left-radius: var(--radius-sm);
}
.chatbot-msg-user .chatbot-msg-bubble {
  background: var(--emerald); color: var(--white);
  border-bottom-right-radius: var(--radius-sm);
}
.chatbot-link {
  display: inline-block; margin-top: 0.5rem;
  color: var(--emerald); font-weight: 600; font-size: 0.8rem;
  text-decoration: underline;
}
.chatbot-msg-user .chatbot-link { color: var(--sun); }

.chatbot-input {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.chatbot-input input {
  flex: 1; border: 1px solid var(--border); padding: 0.6rem 0.75rem;
  border-radius: var(--radius); font-size: 0.85rem;
  font-family: 'Inter', sans-serif; outline: none;
}
.chatbot-input input:focus { border-color: var(--emerald); }
.chatbot-input button {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--emerald); color: var(--white); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.chatbot-input button:hover { background: var(--forest); }

.chatbot-suggestions {
  display: flex; gap: 0.4rem; padding: 0.5rem 1rem 0.75rem;
  flex-wrap: wrap;
}
.chatbot-suggestion {
  padding: 0.3rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: 0.75rem;
  font-family: 'Inter', sans-serif; color: var(--muted-fg);
  background: var(--white); cursor: pointer; transition: all 0.2s;
}
.chatbot-suggestion:hover {
  border-color: var(--emerald); color: var(--emerald);
  background: var(--emerald-50);
}
