/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #eef2f7;
    padding: 30px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

/* Headings */
h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Form Elements */
label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

input, select, button {
    padding: 10px;
    margin-top: 8px;
    margin-right: 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
}

textarea {
  height: 360px;
  max-height: 520px;
  resize: vertical;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 13px;
  box-sizing: border-box;
}

/* Make Thinking a bit smaller */
textarea.thinking {
  height: 180px;
}

/* Make Answering taller than Thinking */
textarea.answering {
  height: 420px;
}

/* Container for the Answering label + Copy button */
.answering-block {
  margin-top: 16px;
}

.answering-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Copy button styling */
.copy-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #999;
  background-color: #f5f5f5;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:hover {
  background-color: #e9e9e9;
}

.copy-btn:active {
  transform: translateY(1px);
}

/* “Copied!” message */
.copy-message {
  margin-top: 4px;
  font-size: 12px;
  color: #2e7d32; /* green-ish */
  min-height: 16px; /* keep area stable even when empty */
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 15px;
}

.actions .btn {
  min-width: 120px;
}

/* Your existing styles, slightly adapted */
.btn {
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  padding: 10px 16px;
  border-radius: 5px;
  font-size: 13px;
}

.btn:disabled {
  background-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.btn:hover:not(:disabled) {
  background: #0056b3;
}

.copy-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #999;
  background-color: #f5f5f5;
  cursor: pointer;
  white-space: nowrap;
}

.next-btn {
  background: #3b1f8f;
}

.refine-btn {
  background: #947cce;
}

.cancel-btn {
  background: #ff0000;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  padding: 10px 16px;
  border-radius: 5px;
  font-size: 13px;
  width: auto;
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of everything */
}

.overlay-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#overlay.hidden {
    display: none;
}

.page-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  margin-top: 10px;
  letter-spacing: 0.05em;
}

/* Mode switch container */
.mode-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f5f7fb;
  border-radius: 999px;
  border: 1px solid #d0d4e0;
  font-size: 12px;
  margin-left: 10px;
}

.mode-switch-label {
  font-weight: 600;
  color: #333;
}

.mode-option {
  color: #666;
  white-space: nowrap;
}

.mode-option-right {
  font-weight: 600;
  color: #3b1f8f; /* highlight recommended side */
}

/* iOS-style switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.switch input:checked + .slider {
  background-color: #3b1f8f; /* your dark purple */
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}
.control-group label {
  font-size: 14px;
}