/* ====== CREATE PAGE SPECIFIC STYLES ====== */

.create-page {
  text-align: center;
  padding-bottom: 80px; /* відступ для navbar */
}

/* ====== INPUTS ====== */
input[type="text"],
input[type="file"],
select,
textarea {
  width: 100%;
  font-size: 1rem;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #222; /* темніша поверхня під інпут */
  color: #fff;
  box-sizing: border-box;
}

input[type="file"] {
  display: none !important;
  pointer-events: none;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ====== ПІДПИСИ/ПІДКАЗКИ ====== */
label {
  display: block;
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 500;
}

.hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* ====== ASPECT RATIO ====== */
.aspect-ratio-buttons {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.ratio-btn {
  flex: 1;
  background: #222;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: transform .15s ease, background-color .15s ease;
}
.ratio-btn:active { transform: scale(.98); }
.ratio-btn.selected {
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-weight: 600;
}

/* дубльований селект схований (якщо потрібен програмно) */
#aspectRatio { display: none; }

/* ====== CTA КНОПКА “CREATE” ====== */
#generateBtn {

  width: auto;              /* було 100% */
  display: inline-flex;     /* лишаємо красиве вирівнювання контенту */
  align-items: center;
  justify-content: center;
  padding: 16px 32px;       /* регулюй ширину кнопки */
  min-width: 220px;         /* опційно: базова мінімальна ширина */
  max-width: 340px;         /* опційно: не розпирати занадто */
  border-radius: 24px;
 

  background: var(--cta-bg);
  color: var(--cta-fg);
  border: none;

  font-size: 18px;
  font-weight: 600;
  cursor: pointer;

  box-shadow: var(--cta-shadow);
  transition: background-color .2s ease, transform .12s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}

#generateBtn:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

#generateBtn:active {
  transform: translateY(0);
  filter: brightness(.98);
}

#generateBtn:disabled {
  opacity: .6;
  cursor: not-allowed;
  box-shadow: none;
}

#generateBtn:focus-visible {
  outline: 2px solid var(--cta-hover);
  outline-offset: 2px;
}

/* ====== SPINNER/RESULT ====== */
#spinner {
  color: #aaa;
  font-style: italic;
  margin-top: 16px;
}

#generatedImage {
  margin-top: 24px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,.3);
}

/* ====== UPLOAD BOX ====== */
.upload-box {
  background-color: #111;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  pointer-events: auto;
  z-index: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, transform .12s ease;
}
.upload-box:hover { background-color: #222; }
.upload-box:active { background-color: #333; transform: scale(.995); }
.placeholder-box { justify-content: flex-start; }

.upload-icon {
  width: 36px;
  height: 36px;
  background-color: #333;
  color: #fff;
  font-size: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

.upload-title { font-size: 1rem; color: #fff; }
.upload-subtitle { font-size: 14px; color: #888; margin-top: 2px; }

.upload-box img {
  max-width: 48px;
  max-height: 48px;
  border-radius: 8px;
  object-fit: contain; /* показує все зображення без обрізки */
}

.upload-box .file-name { font-size: 1rem; color: #fff; }
.upload-box .file-size { font-size: 14px; color: #888; }
.upload-box .upload-placeholder { font-size: 1rem; color: #888; }

.upload-box .remove-btn {
  position: absolute;
  right: 12px;
  font-size: 22px;
  color: var(--cta-bg);
  cursor: pointer;
}

/* ====== КОНТЕЙНЕРИ ====== */
.create-container,
#app {
  padding: 0 10px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  margin-top: 0;
}

#error:empty {
  display: none;
}

.error {
  margin: 0;
  padding: 0;
}
