﻿/* styles.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 50px auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
}

input[type="text"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    display: block;
    width: 100%;
    padding: 15px;
    background: #007bff;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
}

button:hover {
    background: #0056b3;
}

#audioPlayer {
    display: block;
    width: 100%;
    margin-top: 20px;
}

#downloadLink {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: #007bff;
    text-decoration: none;
}

#downloadLink:hover {
    text-decoration: underline;
}

/* --- container layout --- */
.container {
  display: flex;
  flex-direction: row;    /* place children side-by-side */
  max-width: 1000px;
  margin: 40px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- main content takes remaining width --- */
.main-content {
  flex: 1;
  padding: 20px;
}

/* --- right sidebar fixed width --- */
.sidebar {
  width: 220px;
  padding: 20px;
  background: #f9f9f9;
  border: 1px solid #ddd;
}

/* --- hide/toggle helper --- */
.hidden {
  display: none !important;
}

/* --- form controls --- */
textarea, input[type="text"], select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* --- button groups --- */
.buttons button {
  width: 48%;
  margin-right: 4%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  background: #0066ff;
  color: #fff;
  cursor: pointer;
}
.buttons button:last-child {
  margin-right: 0;
}

/* --- sidebar button --- */
.sidebar button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: none;
  border-radius: 4px;
  background: #0066ff;
  color: #fff;
  cursor: pointer;
}

/* --- nice audio & download link spacing --- */
audio, a#downloadLink {
  display: block;
  width: 100%;
  margin-top: 16px;
}

/* ==== NEW: Sidebar labels & inputs spacing ==== */

/* Make each label in the sidebar stack vertically */
.sidebar label {
  display: block;
  margin-bottom: 16px;
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

/* Ensure the <input> inside each label is on its own line */
.sidebar label input {
  display: block;
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
}

/* Slightly reduce the font-size for file/number inputs */
.sidebar input[type="file"],
.sidebar input[type="number"] {
  font-size: 13px;
}

/* Add a bit of padding and border for number input */
.sidebar input[type="number"] {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Give the file inputs a consistent look */
.sidebar input[type="file"] {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px;
  background: #fafafa;
  cursor: pointer;
}

/* Container for the password field + toggle button */
.api-key-wrapper {
  position: relative;
  margin-bottom: 12px;
}

/* Make the input fill the width, minus space for the button */
.api-key-wrapper input[type="password"],
.api-key-wrapper input[type="text"] {
  width: 100%;
  padding: 8px 60px 8px 8px; /* right‐padding leaves room for the toggle */
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
}

/* ===== Revised: API‐Key field + Show/Hide toggle ===== */

/* Container for the password field + toggle button */
.api-key-wrapper {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 12px;
}

/* Make the input occupy 90% of the wrapper */
.api-key-wrapper input[type="password"],
.api-key-wrapper input[type="text"] {
  flex: 0 0 90%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  background-color: #007bff;
  color: #ffffff;
}

.api-key-wrapper input::placeholder {
  color: #ffffff;
}

/* Give the toggle button the remaining 10% width */
.api-key-wrapper button#toggleApiKey {
  flex: 0 0 10%;
  margin-left: 8px;
  padding: 11px;
  border: none;
  background: #007bff;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  box-sizing: border-box;
}

/* Hover/focus effects for the toggle */
.api-key-wrapper button#toggleApiKey:hover,
.api-key-wrapper button#toggleApiKey:focus {
  background: #0056b3;
  outline: none;
}

#toggleApiKey {
  margin-bottom: 0px;
}

#modelSelect {
  width: 50%;
}

.sidebar-image {
  text-align: center;
  margin-bottom: 16px;
}

.sidebar-image img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: inline-block;
}

#voiceCountDisplay {
  padding-left: 10px;
}

.model-container {
  margin-top: 25px;
    margin-bottom: 25px;
}

#instructionsText {
margin-top: 15px;
background-color: #fffedd;
}

.sidebar-greencoders {
  font-size: 12px;
}

/* ================================================= */
