/* CSS Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

body {
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  margin: 0;
  padding: 16px;
  background-color: #11111a;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden; /* Prevent body scrolling */
  font-size: 15px;
}

.description {
  background-color: white;
  border-radius: 0;
  color: #666;
  padding: 24px;
  border-bottom: 1px solid #dddddf;
}

.description p {
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

.description p:last-child {
  margin-top: 8px;
}

.side-panel-controls {
  padding: 24px;
}

.side-panel {
  position: relative;
  width: 40%;
  height: calc(100vh - 32px);
  background-color: #fafbfc;
  border-radius: 6px;
  float: left;
  overflow-y: auto;
  box-sizing: border-box;
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
  z-index: 10;
}

.main-content {
  position: absolute;
  right: 0;
  width: 59%;
  height: calc(100vh - 32px);
  padding: 24px;
  color: white;
  box-sizing: border-box;
  transition: width 0.6s cubic-bezier(0.65, 0.05, 0.36, 1),
    right 0.6s cubic-bezier(0.65, 0.05, 0.36, 1);
  transition-delay: 0.5s;
}

.main-content.adjusted {
  width: 59%;
  right: 0;
}

.section {
  margin-bottom: 32px;
}

.section h3 {
  font-size: 14px;
  color: #66666a;
  margin-bottom: 12px;
  font-weight: 600;
}

textarea {
  width: 100%;
  height: 100px;
  padding: 8px;
  border: 1px solid #dddddf;
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
}

.thumbnail-option {
  aspect-ratio: 1;
  border: 1px solid #dddddf;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  min-height: 0;
  position: relative;
  transition: opacity 0.2s ease-out;
  overflow: hidden;
}

.thumbnail-option.selected {
  border: 2px solid #0044ff;
  box-shadow: 0px 0px 12px rgba(17, 17, 26, 0.1);
}

.thumbnail-option img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease-out;
}
#cameraTypeGrid .thumbnail-option img {
  transform: scale(0.8);
}

/* When there's a selected item in the grid, fade others */
.thumbnail-grid:has(.selected) .thumbnail-option:not(.selected) img {
  opacity: 0.4;
}

/* Hover effect on faded items */
.thumbnail-grid:has(.selected) .thumbnail-option:not(.selected):hover img {
  opacity: 1;
}

.main-content h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #f8f9fa;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  font-family: "Public Sans", system-ui, -apple-system, sans-serif;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #e4e4e7;
  width: 100%;
  height: calc(100% - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding-bottom: 4rem;
  font-size: min(8vw, 80px);
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* Add styles for each property line */
.result .property {
  display: block;
  width: 100%;
  padding: 0.1em 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Style for the base prompt */
.result .base-prompt {
  font-size: 1.2em;
  color: #ffffff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 1em;
  margin-bottom: 1em;
}

.result span.comma {
  color: #9ca3af;
  margin-right: 0.4em;
  font-style: italic;
}

/* Only show tooltip if data-title attribute exists */
.thumbnail-option[data-title]:hover::after,
.thumbnail-option[data-title].selected::after {
  content: attr(data-title);
  position: absolute;
  bottom: 0%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 8px;
  border-radius: 0x;
  font-size: 13px;
  white-space: pre-wrap;
  width: 100%;
  z-index: 1000;
  pointer-events: none;
}

.button-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  opacity: 0;
  animation: fadeInButtons 0.5s ease-out forwards;
  animation-delay: 0.6s;
}

.copy-button {
  padding: 10px 20px;
  background-color: #0044ff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease, opacity 0.3s;
  opacity: 1;
}

.copy-button:hover {
  background-color: rgba(0, 68, 255, 0.8);
}

.copy-button.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.copy-url-button {
  padding: 10px 16px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  border: 1px solid #dddddf;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-url-button:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.02);
}

.copy-url-button.success {
  background-color: #d1fae5;
  border-color: #34d399;
  color: #065f46;
}

.copy-url-button svg {
  width: 16px;
  height: 16px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeUpIn {
  from {
    /* opacity: 0; */
    transform: translateY(10px);
  }
  to {
    /* opacity: 0.3; */
    transform: translateY(0);
  }
}

@keyframes fadeInButtons {
  from {
    transform: translateX(-50%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%);
    opacity: 1;
  }
}

.prompt-part {
  width: 100%;
  display: block;
  word-wrap: break-word;
  white-space: normal;
  text-transform: lowercase;
  margin-bottom: 1.1rem;
  line-height: 1.1;
  font-size: min(8vw, 80px);
  text-wrap: balance;
}

.prompt-part::first-letter {
  text-transform: uppercase;
}

.prompt-part:last-child {
  border-bottom: none;
}

.prompt-part::after {
  content: "&";
  color: rgba(255, 255, 255, 0.5);
}

/* Add this new rule */
.prompt-part:last-of-type::after {
  content: ".";
}

/* Keep the existing rule for realistic part */
.prompt-part[data-value="realistic"]::after {
  content: none;
}

@keyframes slideIn {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  cursor: pointer;
}

/* Sref list styles */
.sref-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sref-input {
  flex: 1;
  min-width: 100px;
  padding: 8px;
  border: 1px solid #dddddf;
  border-radius: 6px;
  font-family: inherit;
  background: white;
  color: black;
}

.sref-weight-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.sref-weight-label {
  font-size: 14px;
  color: #66666a;
  min-width: 50px;
}

.sref-weight-slider {
  flex: 1;
  min-width: 100px;
}

.sref-weight-value {
  min-width: 40px;
  text-align: right;
  font-weight: 600;
  color: #333;
}

.sref-remove-btn {
  background: #f0f0f0;
  border: 1px solid #dddddf;
  color: #666;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.sref-remove-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.add-sref-btn {
  width: 100%;
  padding: 10px;
  background: white;
  border: 1px dashed #dddddf;
  color: #66666a;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
  font-size: 14px;
}

.add-sref-btn:hover {
  background: #f8f8f8;
  border-color: #999;
  color: #333;
}
