:root {
  --header-text-color: #485C6E;
  --border-color: #F1F1F1;
}

body {
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.content-container {
  background-color: white;
  border: 1px solid var(--border-color);
  box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

.header-title {
  font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
  font-weight: 700;
  color: var(--header-text-color);
}

.header-desc {
  font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
  font-weight: 400;
  color: var(--header-text-color);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 500px;
}

.separator {
  background-color: #F1F1F1;
  margin: auto;
  height: 95%;
  display: none;
  width: 2px;
  margin: 0.5;
}

.input-section,
.output-section {
  padding: 0.5rem;
  border: none;
  word-break: break-word;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-505050);
  margin-bottom: 1rem;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.empty-state {
  min-height: 250px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
  color: #BEBEBE;
}

.empty-state h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #757682;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.856rem;
  color: #757682;
  margin: 0;
}

#ss-variants-count-progressbar {
  min-height: 48px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.action-btns {
  height: 2.3125rem;
}

.header-action-btns {
  display: flex;
  gap: 0.5rem;
  height: 2.25rem;
}

.btn-primary {
  background: var(--color-primary-light);
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--color-primary-dark);
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-loading-spinner {
  border: 1px solid #f3f4f6;
  border-top: 1px solid var(--color-primary-light);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

.btn-secondary {
  border: 1px solid #F1F1F1;
  box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.12);
  width: 2.25rem;
  height: auto;
  background-color: white;
  color: #485C6E;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0.375rem;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #F9FAFB;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
  border-color: #E5E7EB;
}

.btn-secondary:disabled {
  background-color: #F5F5F5;
  color: #A1A1AA;
  border-color: #E5E5E5;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-secondary-loader {
  border: 2px solid #F1F1F1;
  border-top: 2px solid #485C6E;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

.btn-secondary:disabled .btn-secondary-loader {
  border-top-color: #A1A1AA;
}

.btn-secondary .btn-icon {
  display: flex;
  align-items: center;
}

.btn-secondary .btn-secondary-loader.d-none {
  display: none !important;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   INPUT TEXTAREA FIELDS
   ========================================================================== */

.field-group {
  display: flex;
  flex-direction: column;
}

.field-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-grey-700);
  margin-bottom: 6px;
}

.field-label .optional {
  font-weight: 400;
  color: var(--color-grey-300);
}

.field-input {
  padding: 10px 12px;
  max-height: 2.315rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  background-color: #ffffff;
  transition: border-color 0.2s ease;
}

.input-group-custom {
  position: relative;
}

#sentence-textarea {
  min-height: 80px;
  height: 140px;
  max-height: auto;
  resize: vertical;
}

#additional-context-textarea {
  min-height: 60px;
  height: 80px;
  max-height: 200px;
  resize: vertical;
}

.char-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 12px;
  color: #6b7280;
  background: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.char-counter.char-limit-warning {
  color: #f59e0b;
}

.char-counter.char-limit-error {
  color: #ef4444;
}

.form-label {
  font-size: 14px;
  font-weight: 700;
  color: #757682;
  margin-bottom: 0.4rem;
}

.form-label.required::after {
  content: " *";
  color: red;
  font-weight: 700;
}

.form-label.optional::after {
  content: " (Optional)";
  font-weight: 400;
  color: #A0A0A0;
}

/* ==========================================================================
   CONFIGURATION DROPDOWNS
   ========================================================================== */

.ss-configuration-dropdowns-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
}

#ss-tone-dropdown-container,
#ss-language-dropdown-container {
  width: 100%;
  min-height: 40px;
}

#ss-paragraph-dropdown-container {
    width: 100%;
}

/* ==========================================================================
   OUTPUT TYPE TABS
   ========================================================================== */

.output-type-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin-bottom: 0.6rem;
}

.output-type-tabs {
  width: 100%;
  justify-content: center;
  display: flex;
  gap: 4px;
  background-color: #f8fafc;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #265BAA20;
}

.output-type-tab {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  border: none;
  background-color: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.output-type-tab:hover {
  background-color: #265BAA10;
  color: #265BAA;
}

.output-type-tab.active {
  background-color: #265BAA;
  color: white;
  box-shadow: 0 2px 4px rgba(38, 91, 170, 0.15);
}

/* ==========================================================================
   ADVANCED OPTIONS
   ========================================================================== */

.advanced-options-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: space-between;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  /* overflow: hidden; */
}

.advanced-options-container .dropdown-container {
  transition: opacity 0.2s ease-in-out;
}

.input-action-btns {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.2rem;
}

.radio-btn-container {
  display: flex;
  gap: 0.4rem;
  height: 100%;
  justify-content: start;
}

.radio-btn-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.radio-btn-option:hover {
  background: #f8fafc;
}

.radio-btn-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary-light);
}

.radio-btn-option label {
  font-size: 14px;
  font-weight: 400;
  color: #2F2F2F;
  cursor: pointer;
  margin: 0;
}

/* ==========================================================================
   RESULT CARDS
   ========================================================================== */

#generated-output-result {
  height: 100%;
  overflow-y: auto;
  flex-direction: column;
}

#generated-output-result {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.ss-result-card {
  background: #FBFBFD;
  border: 1px solid #F1F1F1;
  border-radius: 12px;
  padding: 1.5rem 1.125rem;
  margin-bottom: 0.7rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ss-result-card:hover {
  border-color: #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ss-result-card-header {
  border-bottom: 2px solid #F1F1F1;
  padding-bottom: 0.75rem;
}

.ss-result-card-number {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-505050);
  letter-spacing: 0.5px;
  background: #F8F9FA;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #E9ECEF;
}

.ss-result-content {
  padding-top: 0.75rem;
}

.result-original {
  font-size: 1rem;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.result-simplified {
  font-size: 1rem;
  color: #4B5563;
  line-height: 1.6;
}

.result-original strong,
.result-simplified strong {
  color: #374151;
  font-weight: 600;
}

.copy-btn {
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.copy-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.copy-btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   RESPONSIVE DESIGN - BREAKPOINTS
   ========================================================================== */

/* Mobile Only (0px to 767px) */
@media (max-width: 767px) {
  #generated-output-result {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }

  #generated-output-result::-webkit-scrollbar {
    display: none !important;
  }
}

/* Tablet and Up */
@media (min-width: 768px) {
  .output-type-section {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .output-type-tabs {
    width: auto;
    justify-content: flex-start;
  }

  .output-type-tab {
    flex: none;
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* Desktop and Up */
@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 1rem 1fr;
  }

  .separator {
    display: block;
  }

  .advanced-options-container {
    flex-direction: column;
  }
}

/* Large Desktop and Up */
@media (min-width: 1280px) {
  .output-type-section {
    gap: 20px;
  }
}

/* Mobile landscape specifically */
@media (max-width: 767px) and (orientation: landscape) {
  .output-type-section {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .output-type-tabs {
    width: auto;
  }

  .output-type-tab {
    flex: none;
    padding: 4px 8px;
    font-size: 12px;
  }
}