:root {
  --header-text-color: #485c6e;
  --border-color: #f1f1f1;
}

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

.main-content-wrapper {
  padding: 1.5rem;
}

.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;
  padding: 1.5rem;
}

.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;
  cursor: col-resize;
}

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

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #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;
}

/* ==========================================================================
   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;
}

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

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

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

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

/* ==========================================================================
   INPUT TEXTAREA LIMIT
   ========================================================================== */

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

#topic-textarea {
  min-height: 4rem;
  max-height: 7rem;
  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-small {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: #6b7280;
  background: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

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

.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;
}

/* ==========================================================================
   CONFIGURATIONS DROPDOWNS
   ========================================================================== */
.sentence-configuration-dropdowns-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
}

#sentence-length-dropdown-container,
#writing-style-dropdown-container {
  min-height: 40px;
  width: 100%;
}

/* ==========================================================================
   LANGUAGE DROPDOWN (Searchable)
   ========================================================================== */

.language-dropdown {
  position: relative;
  width: 100%;
  grid-column: 1 / -1;
}

#language-search {
  width: 100%;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 1000;
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: none;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-list li {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-list li:hover {
  background-color: #f1f1f1;
}

.is-invalid {
  border-color: #e74c3c;
  background-color: #fdecea;
  transition: border-color 0.3s, background-color 0.3s;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
#sentence-length-progressbar {
  min-height: 48px;
}

/* ==========================================================================
   OUTPUT RESULT - CARD STYLE
   ========================================================================== */
#generated-output-result {
  height: 100%;
  overflow-y: auto;
  flex-direction: column;
}

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

/* Sentence Card Styles */
.sentence-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;
}

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

/* Sentence Header Styles */
.sentence-header {
  border-bottom: 2px solid #f1f1f1;
  padding-bottom: 0.75rem;
}

.sentence-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;
}

/* Sentence Content Styles */
.sentence-content {
  padding-top: 0.75rem;
}

.sentence-text {
  font-size: 1rem;
  color: #374151;
  line-height: 1.6;
}

/* Copy Button Styles */
.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);
}

.add-sample-btn {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #485c6e;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-sample-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

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

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

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

  .sentence-configuration-dropdowns-container {
    grid-template-columns: 1fr;
  }

  .language-dropdown {
    grid-column: 1;
  }
}

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

  .separator {
    display: block;
  }
}