/* /styles/visionmapping.css */
/* Vision Mapping Layout & Styling */

/* ====== Tokens ====== */
:root {
  --vm-border-color: var(--brand-gold, #b08a48);
  /* SWITCHED TO PURE WHITE - Safer for tablets */
  --vm-bg-surface: #ffffff;      
  --vm-bg-surface-alt: #ffffff;  
  --vm-text-color: #000;
  --vm-radius-lg: 0.75rem;       
  --vm-radius-md: 0.5rem;        
  --vm-gap-lg: 1.5rem;
  --vm-gap-md: 1rem;
  --vm-gap-sm: 0.5rem;
  --vm-shadow-block: 0 2px 8px rgba(0,0,0,0.05);
}

/* =========================================
   1. Main Layout Containers
   ========================================= */

/* The Left Rail Container */
.visionmapping__panel {
  background-color: var(--vm-bg-surface) !important;
  color: #000000 !important;
  
  border: 1px solid var(--vm-border-color) !important; 
  border-radius: var(--vm-radius-lg);
  padding: var(--vm-gap-lg);
  box-shadow: var(--vm-shadow-block);
  min-height: 500px; 
  display: flex;
  flex-direction: column;
}

/* The Right Rail Container (History) */
.visionmapping__sidepanel {
  padding: 0;
  border: 0;
  background: transparent;
}

/* =========================================
   2. The "Controls" Toolbar (Top of Left Rail)
   ========================================= */
.vm__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vm-gap-md);
  padding-bottom: var(--vm-gap-lg);
  margin-bottom: var(--vm-gap-lg);
  border-bottom: 1px solid rgba(176, 138, 72, 0.2); 
}

.vm__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #000000 !important;
  margin: 0;
}

.vm__controls select {
  padding: 0.4rem 2rem 0.4rem 0.8rem; 
  border: 1px solid var(--vm-border-color);
  border-radius: var(--vm-radius-md);
  background-color: #ffffff !important; 
  color: #000000 !important;            
  font-size: 0.9rem;
  cursor: pointer;
  height: 36px;
}

/* The "Pull Card" Button */
#vmPull {
  margin-left: auto; 
  background-color: var(--vm-border-color);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--vm-radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

#vmPull:hover {
  background-color: #9a773f; 
}

/* =========================================
   3. The "Card" Display (Main Content)
   ========================================= */
#vmCardZone {
  flex: 1;
}

/* Styling the generic "card" output from CardRenderer.js */
.vm-card-block, 
.visionmapping__panel .card { 
  background-color: #ffffff !important;
  color: #000000 !important;
  
  border: 1px solid #e0e0e0;
  border-left: 4px solid var(--vm-border-color); 
  border-radius: var(--vm-radius-md);
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

/* Card Title */
.vm-card-block h2, 
.visionmapping__panel h2 {
  font-size: 1.5rem;
  font-weight: 700 !important;
  color: #000000 !important;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

/* Section Headers */
.vm-card-block h3, 
.visionmapping__panel h3,
.visionmapping__panel h4 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--vm-border-color) !important; 
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Body Text */
.vm-card-block p,
.visionmapping__panel p {
  font-size: 1rem;
  line-height: 1.6;
  color: #000000 !important;
  margin-bottom: 1rem;
}

/* =========================================
   4. Inputs & Recording (Inside the Card)
   ========================================= */
.visionmapping__panel textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: var(--vm-radius-md);
  padding: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  
  /* Pure White Background */
  background-color: #ffffff !important;
  color: #000000 !important;
  
  min-height: 120px;
  resize: vertical;
  transition: all 0.2s;
  display: block;
  margin-bottom: 0.5rem;
}

.visionmapping__panel textarea:focus {
  background-color: #ffffff !important;
  border-color: var(--vm-border-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(176, 138, 72, 0.1);
}

/* The "Start Recording" Button */
.visionmapping__panel button.btn-outline-secondary,
.visionmapping__panel button[id^="record"] {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #fff;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0.25rem;
  cursor: pointer;
}

.visionmapping__panel button.btn-outline-secondary:hover {
  border-color: var(--vm-border-color);
  color: var(--vm-border-color);
}

/* =========================================
   5. History List (Right Rail)
   ========================================= */
.vm-history-list {
  display: flex;
  flex-direction: column; 
  gap: 0.5rem;
}

.vm-history-item {
  background: #fff;
  border: 1px solid #eee;
  border-left: 3px solid transparent;
  padding: 0.75rem 1rem;
  border-radius: var(--vm-radius-md);
  text-align: left;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.vm-history-item:hover {
  border-color: var(--vm-border-color);
  background: #f8f9fa; /* Safe light grey hover */
}

.vm-history-item.active {
  border-left-color: var(--vm-border-color);
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* =========================================
   6. Mobile Responsiveness
   ========================================= */
@media (max-width: 768px) {
  .vm__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  #vmPull {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
  
  .visionmapping__panel {
    padding: var(--vm-gap-md);
  }
}