/* Base Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1,
h2,
h3,
h4 {
  color: #2c3e50;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
}

p {
  text-align: center;
  color: #7f8c8d;
  margin-top: 0;
  margin-bottom: 30px;
}

/* Upload Container */
.upload-container {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.drop-area {
  border: 2px dashed #bdc3c7;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.drop-area.highlight {
  border-color: #3498db;
  background-color: #f0f8ff;
}

.drop-content {
  max-width: 400px;
  margin: 0 auto;
}

.upload-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  opacity: 0.7;
}

.small {
  font-size: 0.9em;
  color: #95a5a6;
  margin: 10px 0;
}

/* Buttons */
.browse-btn,
.generate-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.browse-btn:hover,
.generate-btn:hover {
  background-color: #2980b9;
}

.generate-btn {
  width: 100%;
  font-weight: bold;
}

.generate-btn:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

.remove-btn {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 20px;
  cursor: pointer;
  padding: 0 10px;
}

/* File Info */
.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ecf0f1;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

/* Loading */
.loading {
  text-align: center;
  margin: 30px 0;
}

.spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Results */
.results {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #7f8c8d;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.tab-btn.active {
  color: #3498db;
  border-bottom-color: #3498db;
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Markdown Content */
.markdown-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.markdown-content h1 {
  font-size: 2em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
}

.markdown-content h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
}

.markdown-content h3 {
  font-size: 1.25em;
}

.markdown-content ul {
  padding-left: 2em;
}

.markdown-content li {
  margin-bottom: 0.5em;
}

.markdown-content code {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
  padding: 0.2em 0.4em;
  font-size: 85%;
}

.markdown-content pre {
  background-color: #f6f8fa;
  border-radius: 3px;
  padding: 16px;
  overflow: auto;
  line-height: 1.45;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

/* Charts */

.charts-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px; /* Increased gap for better separation */
  max-width: 800px;
  margin: 0 auto; /* Center the container */
  padding: 20px;
}

.chart {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px; /* Slightly larger radius */
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Softer shadow */
  width: 100%; /* Will respect parent's max-width */
}

.chart img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px; /* Slight rounding for images */
}

/* Optional: Add some animation on hover */
.chart:hover {
  transform: translateY(-5px);
  transition: transform 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
/* Error */
.error {
  background: #fdecea;
  color: #c62828;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .charts-container {
    grid-template-columns: 1fr;
  }

  .upload-container,
  .results {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .charts-container {
    padding: 10px;
    gap: 20px;
  }

  .chart {
    padding: 15px;
    border-radius: 6px;
  }
}

/* provider selector: */
.cloud-provider-selector {
  --aws-color: #ff9900;
  --azure-color: #0078d4;
  --border-color: #d1d5db;
  --focus-color: #93c5fd;
  font-family: "Segoe UI", system-ui, sans-serif;
  width: 100%;
  max-width: 300px;
  margin-bottom: 15px;
}

.selector-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.select-wrapper {
  position: relative;
}

.cloud-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: white;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #111827;
}

.cloud-select:focus {
  outline: none;
  border-color: var(--focus-color);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.3);
}

.dropdown-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
  font-size: 12px;
}

/* Cloud-specific option styling */
.cloud-select option[value="aws"] {
  color: var(--aws-color);
}

.cloud-select option[value="azure"] {
  color: var(--azure-color);
}


/* File List Styles */
#file-list {
  flex-grow: 1;
}

#file-list p {
  text-align: left;
  margin: 0;
  color: #333;
}

#file-list ul {
  margin: 5px 0 0 0;
  padding-left: 20px;
}

#file-list li {
  margin-bottom: 3px;
  color: #555;
  font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .file-info {
      flex-direction: column;
      align-items: flex-start;
  }
  
  #removeFiles {
      align-self: flex-end;
      margin-top: 10px;
  }
}