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

.active-passive-parent-container {
  background-color: var(--color-blue-500);
}

#character-length-progressbar {
  min-height: 48px;
}

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

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

.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: var(--bg-light-gray);
  margin: auto;
  height: 95%;
  display: none;
  width: 2px;
  margin: 0.5;
}

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

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

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

.empty-state {
  height: 100%;
  background: var(--color-gray-75);
  border: 2px dashed var(--color-gray-slate-300);
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-gray-100);
}

.empty-state h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gray-400);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.856rem;
  color: var(--color-gray-400);
  margin: 0;
}

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

.action-btns {
  height: 2.3125rem;
  position: relative;
  z-index: 1;
}

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

.btn-primary {
  background: var(--color-primary-light);
  border: none;
  color: var(--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: var(--color-gray-disabled);
  cursor: not-allowed;
}

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

/* Individual variant copy button */
.copy-single-btn {
  background: transparent;
  border: 1px solid var(--color-gray-125);
  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-single-btn:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-D1D5DB);
}

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

.variant-header-container {
  border-bottom: 2px solid var(--bg-light-gray);
  padding-bottom: 0.75rem;
}

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

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

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

/* Hover state */
.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-gray-50);
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
  border-color: var(--color-gray-125);
}

/* Disabled state */
.btn-secondary:disabled {
  background-color: var(--color-gray-150);
  color: var(--color-zinc-400);
  border-color: var(--color-gray-e5e5e5);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ==========================================================================
   QUICK EXAMPLES & SAMPLE PILLS
   ========================================================================== */

.quick-examples {
  border-radius: 8px;
  margin-top: 1rem;
}

.quick-examples h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gray-400);
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   INPUT TEXTAREA & RESIZABLE TEXTAREA
   ========================================================================== */

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

.input-group-custom .form-control {
  min-height: 115px;
}

/* Resizable textarea specific styles */
.resizable-textarea {
  resize: vertical !important;
  overflow-y: auto;
  transition: height 0.2s ease;
}

.resizable-textarea:focus {
  outline: 2px solid var(--color-primary-light);
  outline-offset: -2px;
  border-color: var(--color-primary-light);
}

.form-control::placeholder {
  color: var(--color-gray-placeholder);
}

.char-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--color-white);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--color-gray-125);
}

.char-limit-warning {
  color: var(--color-amber-500);
}

.char-limit-error {
  color: var(--color-red-500);
}

.form-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-400);
  margin-bottom: 0.4rem;
}

/* Show '*' mark in red for required labels */
.form-label.required::after {
  content: " *";
  color: var(--color-red-100);
  font-weight: 700;
}

/* Show (Optional) in gray for optional labels */
.form-label.optional::after {
  content: " (Optional)";
  font-weight: 400;
  color: var(--color-gray-A0A0A0);
}

/* ==========================================================================
   KEYWORDS MANAGEMENT STYLES
   ========================================================================== */

.keywords-input-container {
  width: 100%;
}

.keywords-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 32px;
  padding: 8px;
  border: 1px var(--color-gray-125);
  border-radius: 6px;
  background-color: var(--color-gray-50);
}

.keywords-tags:empty::before {
  content: "Keywords will appear here...";
  color: var(--color-gray-placeholder);
  font-style: italic;
  font-size: 0.875rem;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--color-slate-100) 0%,
    var(--color-slate-200) 100%
  );
  color: var(--header-text-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-gray-A0A0A0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  /* animation: slideInKeyword 0.3s ease-out; */
}

.keyword-tag .remove-keyword {
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
  color: var(--color-text-505050);
  opacity: 0.7;
  font-size: 16px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.keyword-tag .remove-keyword:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--header-text-color);
}

@keyframes slideInKeyword {
  from {
    opacity: 0;
    transform: translateX(-10px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Input group for keywords */
.keywords-input-container .input-group {
  margin-bottom: 8px;
}

/* ==========================================================================
   META DESCRIPTION CONFIGURATION DROPDOWNS
   ========================================================================== */

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

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

/* ==========================================================================
   RESULT SECTIONS
   ========================================================================== */

.converted-output {
  height: 100%;
  background-color: var(--color-gray-f9f9f9);
  border-radius: 0.75rem;
  border: 1px solid var(--color-gray-e0e0e0);
  padding: 1rem;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  word-break: break-word;
}

/* Scroll bar */
/* For Chrome, Edge, Safari */
#results-container::-webkit-scrollbar {
  width: 6px;
}

#results-container::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

#results-container::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 6px;
}

#results-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

/* For Firefox */
#results-container {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

/* ==========================================================================
   VOICE TYPE RADIO BTNS (Removed story-specific elements)
   ========================================================================== */

.input-action-btns-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: space-between;
  margin: 0.8rem 0;
}

.input-action-btns {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  gap: 0.2rem;
}

/* ==========================================================================
   CREATIVITY RADIO BUTTONS
   ========================================================================== */

.creativity-radio-group {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 0.5rem 0;
}

.creativity-radio-group .form-check {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.creativity-radio-group .form-check-input {
  width: 18px;
  height: 18px;
  margin: 0 0.5rem 0 0;
  border: 2px solid var(--color-gray-A0A0A0);
  border-radius: 50%;
  background-color: var(--color-white);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.creativity-radio-group .form-check-input:checked {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

.creativity-radio-group .form-check-input:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-white);
}

.creativity-radio-group .form-check-input:hover:not(:checked) {
  border-color: var(--color-text-505050);
  box-shadow: 0 0 0 2px rgba(72, 92, 110, 0.1);
}

.creativity-radio-group .form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(72, 92, 110, 0.2);
}

.creativity-radio-group .form-check-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--header-text-color);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.creativity-radio-group .form-check-input:checked + .form-check-label {
  color: var(--color-text-505050);
  font-weight: 600;
}

/* Responsive adjustments for radio buttons */
@media (max-width: 479px) {
  .creativity-radio-group {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .creativity-radio-group .form-check-input {
    width: 16px;
    height: 16px;
  }

  .creativity-radio-group .form-check-input:checked::before {
    width: 6px;
    height: 6px;
  }

  .creativity-radio-group .form-check-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 320px) {
  .creativity-radio-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

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

/* Small Mobiles */
@media (max-width: 479px) {
  .meta-description-configuration-container {
    grid-template-columns: 1fr;
  }

  .keywords-tags {
    padding: 6px;
  }

  .keyword-tag {
    font-size: 0.8rem;
    padding: 4px 10px;
  }
}

/* Mobile Only */
@media (min-width: 480px) {
  .meta-description-configuration-container {
    grid-template-columns: 1fr;
  }
}

/* Tablet and Up */
@media (min-width: 768px) {
  .meta-description-configuration-container {
    grid-template-columns: 1fr 1fr;
  }

  /* Make sure tone and variant are in first row side by side */
  .meta-description-configuration-container > div:nth-child(1),
  .meta-description-configuration-container > div:nth-child(2) {
    grid-column: span 1;
  }

  /* Creativity spans full width on second row */
  .meta-description-configuration-container > div:nth-child(3) {
    grid-column: span 2;
  }

  /* Character length spans full width on third row */
  .meta-description-configuration-container > div:nth-child(4) {
    grid-column: span 2;
  }

  /* Make sure tone and variant are in first row side by side */
  .meta-description-configuration-container > div:nth-child(1),
  .meta-description-configuration-container > div:nth-child(2) {
    grid-column: span 1;
  }

  /* Creativity spans full width on second row */
  .meta-description-configuration-container > div:nth-child(3) {
    grid-column: span 2;
  }

  /* Character length spans full width on third row */
  .meta-description-configuration-container > div:nth-child(4) {
    grid-column: span 2;
  }
}

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

  .separator {
    display: block;
  }

  .input-action-btns-container {
    flex-direction: row;
  }

  .meta-description-configuration-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) and (min-height: 1024px) {
  /* Target tablet portrait */
}

/* Large Desktop and Up */
@media (min-width: 1280px) {
  /* Large desktop and larger */
}

/* =======================
   ORIENTATION BREAKPOINTS
   ======================= */

/* Portrait orientation */
@media (orientation: portrait) {
  /* Portrait mode styles */
}

/* Landscape orientation */
@media (orientation: landscape) {
  /* Landscape mode styles */
}

/* Mobile landscape specifically */
@media (max-width: 767px) and (orientation: landscape) {
  /* Mobile in landscape */
}

/* Initial state: collapsed */
.collapse-transition {
  max-height: 0;
  transition: max-height 0.4s ease-in-out;
}

/* Expanded state */
.collapse-transition.open {
  max-height: 500px;
}

/* ==========================================================================
   MODAL STYLES
   ========================================================================== */

/* For toast msg */
#messageBox {
  position: absolute;
  top: 10%;
  right: 1%;
  z-index: 9999;
  max-width: 40%;
  width: auto;
}

.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.custom-modal.closing {
  opacity: 0;
}

.modal-content {
  background: var(--color-white);
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal.show .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.custom-modal.closing .modal-content {
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
}

.modal-header {
  padding: 24px 24px 0;
  position: relative;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-slate-800);
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-slate-500);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--color-slate-100);
  color: var(--color-slate-700);
}

.modal-body {
  padding: 20px 24px;
}

.modal-description {
  color: var(--color-slate-500);
  line-height: 1.6;
  margin: 0;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-indigo-500) 0%,
    var(--color-purple-600) 100%
  );
  color: var(--color-white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-btn-secondary {
  background: var(--color-white);
  color: var(--color-slate-500);
  border: 2px solid var(--color-slate-200);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn-secondary:hover {
  border-color: var(--color-slate-300);
  color: var(--color-slate-600);
}

/* ==========================================================================
   META DESCRIPTION VARIANT CARDS
   ========================================================================== */

/* Updated styling for meta description variants with darker shades */

.meta-description-variant {
  background: var(
    --color-gray-75
  ) !important; /* #f8fafc - lighter than previous but still darker than original */
  border: 1px solid var(--color-gray-125) !important; /* #E5E7EB - moderate border */
  border-radius: 12px !important;
  padding: 1rem !important;
  margin-bottom: 0.75rem !important;
  transition: all 0.2s ease;
  position: relative;
}

.meta-description-variant:hover {
  border-color: var(--color-gray-100) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.variant-header {
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  color: var(--color-text-505050) !important;
  letter-spacing: 0.5px;
  background: var(--color-gray-75);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--color-gray-125);
  display: inline-block;
  margin-bottom: 0.75rem !important;
}

.character-count-display {
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  padding: 0.375rem;
  float: right; /* Move to right side */
  margin-left: auto;
  margin-right: 5px;
}

.meta-description-content {
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: var(--color-gray-content);
  word-break: break-word;
}

.meta-description-preview {
  position: relative;
}

/* Single variant container styling */
#result-meta-description-text {
  font-family: inherit;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS FOR VARIANTS
   ========================================================================== */

@media (max-width: 768px) {
  .meta-description-variant {
    padding: 0.75rem !important;
    margin-bottom: 0.5rem !important;
  }

  .variant-header {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem;
  }

  .character-count-display {
    font-size: 0.75rem !important;
  }

  .meta-description-content {
    font-size: 0.9rem !important;
  }

  /* Hide scrollbar on mobile for variants */
  #result-meta-description-text {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }

  #result-meta-description-text::-webkit-scrollbar {
    display: none !important;
  }
}
