/* Report Studio Redesign - Matching the provided image */

/* Main container */
.report-studio-container {
  /* background: #f8f9fa; */
  min-height: 100vh;
  padding: 0;
}

/* Header section */
.studio-header {
  background: white;
  color: #2c3e50;
  padding: 2rem;
  border-radius: 8px;
}

.studio-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.studio-header p {
  color: #6c757d;
  margin-bottom: 0;
}

/* Template cards section */
.templates-section {
  background: #e9ecef;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.templates-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.templates-section p {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.template-card {
  background: #6c757d;
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.template-card:hover {
  transform: translateY(-2px);
  background: #5f676d;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.template-card.selected {
  background: #333333;
}

.template-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.template-name {
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.template-description {
  font-size: 0.875rem;
  line-height: 1.3;
  opacity: 0.8;
  flex-grow: 1;
}

/* Collapsible sections */
.collapsible-section {
  background: #f2f2f2;
  border-radius: 16px;
  border: 1px solid #cccccc;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}

.collapsible-header {
  background: #f2f2f2;
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s ease;
}

.collapsible-header:hover {
  background: #e9ecef;
}

.collapsible-title {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.collapsible-title i {
  margin-right: 0.5rem;
}

.collapsible-arrow {
  transition: transform 0.2s ease;
  color: #6c757d;
}

.collapsible-arrow.expanded {
  transform: rotate(180deg);
}

.collapsible-content {
  padding: 1.5rem;
  display: none;
}

.collapsible-content.show {
  display: block;
}

/* Report details section */
.report-details {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.report-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

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

.form-group label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control,
.form-group input[type="text"] {
  border: 1px solid #ced4da;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  width: 100%;
}

.form-control:focus,
.form-group input[type="text"]:focus {
  border-color: #333333;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
  outline: none;
}

/* Format selection cards */
.format-selection {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.format-card {
  background: #6c757d;
  color: white;
  border-radius: 16px;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.format-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.format-card.selected {
  background: #333333;
}

.format-card.raw-data {
  background: white;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.format-card.raw-data:hover {
  border-color: #333333;
  color: #333333;
}

.format-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.format-name {
  font-size: 1.5rem;
  font-weight: 500;
}

.format-description {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: 0.25rem;
  line-height: 1.2;
}

/* Generate button */
.generate-section {
  text-align: left;
  margin-top: 2rem;
}

.generate-button {
  background: #000000;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.generate-button:hover:not(:disabled) {
  background: #1a252f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44,62,80,0.3);
}

.generate-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Topic grid styling */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 33.333%));
  gap: 1.5rem;
  justify-content: start;
}

.topic-card {
  background: #cccccc;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.topic-card h4 {
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.topic-card h4 i {
  margin-right: 0.5rem;
  color: #333333;
}

.topic-card p {
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Selectize input styling */
.selectize-input {
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 0.9rem;
}

.selectize-input.focus {
  border-color: #333333;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Maps section styling */
.maps-section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.selected-maps-list {
  margin-top: 1rem;
}

/* Selected maps container styling */
#selected_maps_container {
  max-width: 66.666%; /* Two-thirds width to match two topic cards */
}

#selected_maps_container h6 {
  margin-bottom: 0.75rem;
}

.selected-map-item {
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-map-item .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .format-selection {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .studio-header {
    padding: 1.5rem;
  }

  .templates-section {
    padding: 1.5rem;
  }
}

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

  .format-selection {
    grid-template-columns: 1fr;
  }
}

/* Selection buttons styling */
.selection-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.selection-buttons .btn {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
}

.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
}


/* Custom selection template styling */
.template-card[data-template-id="custom_selection"] {
  background: #ffffff;
  color: #333333;
}

.template-card[data-template-id="custom_selection"]:hover {
  background: #f2f2f2;
}

/* Dynamic label count styling */
#edit-selection-label span,
#maps-section-label span {
  font-size: 0.875em;
  font-weight: normal;
}
