/* Step 3: Template selection layout fixes */

/* Fixed left sidebar with scrolling templates */
.template-step-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 24px;
  height: 100%;
  overflow: hidden;
}

.template-list-panel {
  display: flex;
  flex-direction: column;
  max-height: 600px;
  overflow: hidden;
}

.template-search-container {
  flex-shrink: 0; /* Don't shrink the search box */
}

.templates-list {
  flex: 1;
  overflow-y: auto;
}

/* Fixed size mobile preview */
.whatsapp-phone-mockup {
  width: 280px;
  height: 500px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0; /* Prevent phone from shrinking */
}

.phone-header {
  flex-shrink: 0; /* Don't shrink header */
}

.phone-chat {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
}

/* Template details with scroll */
.selected-template-display {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  max-height: 500px;
}

.template-details {
  overflow-y: auto;
  max-height: 500px;
  padding-right: 10px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .selected-template-display {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .whatsapp-phone-mockup {
    margin: 0 auto;
  }
}