@import url("/assets/css/colors.css");
@import url("/assets/css/common.css");

/* Remove any tooltips or other elements */
#paraphraseContainer .synonym-tooltip,
#paraphraseContainer .floating-toolbar {
  display: none !important;
}
/* Synonym tooltips */
.synonym-word {
  position: relative;
  color: #cc3300;
  cursor: pointer;
}
.synonym-word.active {
  background-color: #fff8e6;
}
.synonym-tooltip {
  display: none;
  position: absolute;
  /* ... rest of your tooltip styles ... */
}
.synonym-word.active .synonym-tooltip {
  display: block;
}
/* Word span styles for synonym functionality */
.word-span {
  position: relative;
  display: inline;
  cursor: text;
}

/* Synonym dropdown styles */
.synonym-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1001;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  max-width: 300px;
  margin-top: 5px;
  animation: dropdownFadeIn 0.2s ease;
}

/* Add this CSS for the synonym dropdown heading */
.synonym-dropdown-header {
  padding: 12px 16px 8px 8px;
  border-bottom: 2px solid #f0f0f0;
  /* background-color: #fafafa; */
}

.synonym-dropdown-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-grey-900);
  /* color: #666; */
  /* text-transform: uppercase; */
  letter-spacing: 0.5px;
  margin: 0;
  font-family: inherit;
}

.synonym-header {
  background: #f8f9fa;
  padding: 8px 12px;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  font-size: 12px;
  color: #495057;
  border-radius: 7px 7px 0 0;
}

.synonym-list {
  max-height: 200px;
  overflow-y: auto;
  min-width: 120px;
}

.synonym-option {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #495057;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.synonym-option-item:hover {
  background-color: var(--color-primary-ultra-light);
  color: var(--color-primary-dark);
}

.synonym-option:last-child {
  border-bottom: none;
}

.synonym-loading {
  padding: 12px;
  text-align: center;
  color: #6c757d;
  font-size: 12px;
}

.close-synonym-btn {
  width: 100%;
  background: #f8f9fa;
  color: #6c757d;
  border: none;
  border-top: 1px solid #dee2e6;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0 0 7px 7px;
  transition: background-color 0.2s ease;
}

.close-synonym-btn:hover {
  background: #e9ecef;
  color: #495057;
}
.synonym-spinner-svg {
  animation: rotate 1.5s linear infinite;
  width: 20px;
  height: 20px;
  color: var(--color-primary-light);
  align-items: center;
}

.synonym-dropdown {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 150px;
  margin-bottom: 5px;
}

.synonym-header {
  padding: 8px 12px;
  font-weight: bold;
  border-bottom: 1px solid #eee;
}

.synonym-option {
  padding: 6px 12px;
  cursor: pointer;
}

.synonym-option:hover {
  background-color: #f8f9fa;
}

.synonym-loading {
  padding: 12px;
  text-align: center;
  color: #666;
  display: flex;
  justify-content: center;
  width: 100%;
}

.synonym-dropdown-forced,
.synonym-tooltip,
.synonym-dropdown-debug {
  background: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
  min-width: 250px;
  max-width: 350px;
}
.synonym-dropdown-portal {
  position: absolute;
  left: -12px;
  min-width: 100px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  z-index: 100;
  margin-top: 2px;
  max-height: 300px;
  overflow-y: auto;
  font-family: Satoshi !important;
}

.synonym-wrapper {
  position: relative;
  display: inline-block;
}

.synonym-dropdown {
  background: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10px;
  min-width: 250px;
  z-index: 1000;
}

.synonym-header {
  font-weight: bold;
  /* margin-bottom: 8px; */
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
  color: #333;
}

.synonym-context {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-bottom: 8px;
  padding: 4px 8px;
  background-color: var(--color-gray-800);
  border-radius: 4px;
}

.synonym-option {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.synonym-option:hover {
  background-color: var(--color-gray-800);
}

.synonym-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.synonym-loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--color-blue-100);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.synonym-error {
  color: #dc3545;
  padding: 10px;
}

.synonym-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  padding: 12px 15px 8px 15px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--color-gray-800);
  border-radius: 8px 8px 0 0;
  font-size: 14px;
}

.synonym-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--color-gray-600);
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.synonym-close-btn:hover {
  background-color: var(--color-gray-800);
  color: var(--color-gray-600);
}

.synonym-option-item {
  padding: 10px 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
}

/* .synonym-option-item:hover {
         background-color: #e3f2fd;
         color: #1976d2;
     } */

.synonym-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
}

.synonym-loading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--color-blue-100);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.mode-synonym-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--color-white);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.synonym-range {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
}

/* Mobile Synonym Panel Styles */
.mobile-synonym-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 60vh;
  overflow-y: auto;
  transform: translateY(0);
  transition: transform 0.3s ease;
  font-family: Satoshi !important;
}

.mobile-synonym-panel.closed {
  transform: translateY(100%);
}

.mobile-synonym-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: white;
}

.mobile-synonym-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.mobile-synonym-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
}

.mobile-synonym-content {
  padding: 15px;
}

.synonym-mobile-title {
  color: var(--color-gray-500);
  font-weight: 700;
  font-size: 14px;
}

.mobile-synonym-list {
  display: flex;
  flex-direction: column;
}

.synonym-mobile-header {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-gray-500);
}

.mobile-synonym-item {
  padding: 8px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-gray-500);
  font-size: 16px;
}

.mobile-synonym-item:hover {
  background: #e9e9e9;
}

.no-synonyms,
.synonym-error {
  padding: 20px;
  text-align: center;
  color: #666;
}

.mobile-synonym-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.loading-spinner {
  text-align: center;
  padding: 20px;
  color: #666;
}

.synonym-shimmer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding: 4px 0px;
  width: 120px;
}

.shimmer-item {
  height: 30px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.shimmer-item {
  width: 85%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.editable-highlight {
  background-color: #ffeb3b; /* Highlight color */
  border-radius: 3px;
  padding: 0 2px;
  caret-color: #000; /* Ensures cursor visibility */
}

.editable-highlight:focus {
  outline: 2px solid #2196f3; /* Optional focus indicator */
}

.custom-mode-feature {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-item.rephrase {
  color: rgba(13, 110, 253, 0.8);
  /* Faded version of Bootstrap primary blue color #0d6efd */
  font-weight: 500;
}

.rephrase-btn {
  background: var(--color-primary-light);
  border: none;
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  /* Add shadow for better visibility */
  position: relative;
}

.rephrase-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.rephrase-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 990px) {
  .section-bottom {
    justify-content: center;
    padding: 0 15px;
    bottom: 10px;
  }

  .rephrase-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

.sentence-span:hover .rephrase-btn,
.sentence-span.selected .rephrase-btn {
  opacity: 1;
}

/* Rephrase Tooltip Styles */
.rephrase-tooltip {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 6px 12px;
  user-select: none;
  /* Optional: disable text selection */
  pointer-events: auto;
  /* Allow hovering/clicking if needed */
  font-family: Satoshi !important;
}

.rephrase-tooltip-btn {
  /* background: var(--color-primary); */
  /* color: var(--color-primary-light); */
  border: none;
  /* border-radius: 16px; */
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  position: relative;
  transition: all 0.2s ease;
}

.rephrase-tooltip-btn:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

.rephrase-tooltip-btn:disabled {
  background: var(--color-primary-light);
  cursor: not-allowed;
}

.loading-rephrases {
  padding: 10px 15px;
}

/* rephrase dropdown */

/* Rephrase Dropdown Styles */
.rephrase-dropdown-portal {
  background: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  display: flex !important;
  flex-direction: column !important;
  font-family: Satoshi !important;

  /* Animation properties */
  /* animation: dropdownOpen 0.3s ease-out forwards; */
  transform-origin: left center;
  opacity: 0;
}

.rephrase-header {
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rephrase-header span {
  font-weight: 600;
  color: var(--color-gray-700);
  font-size: 15px;
}

.rephrase-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--color-gray-500);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin: 4px;
  transition: background-color 0.2s ease;
}

.rephrase-close-btn:hover {
  background-color: var(--color-primary-light);
  color: var(--color-white);
}

.rephrase-options {
  min-height: 140px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rephrase-option-item {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rephrase-option-item:last-child {
  border-bottom: none;
}

.rephrase-option-item:hover {
  background-color: var(--color-primary-ultra-light) !important;
}

.rephrase-option-item:active {
  background-color: var(--color-gray-800);
}

.rephrase-option-text {
  flex: 1;
  line-height: 1.6;
  color: #2c3e50;
}

.rephrase-cancel-btn {
  background: var(--color-gray-500);
  color: var(--color-white);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.rephrase-cancel-btn:hover {
  background: #5a6268;
}

.rephrase-cancel-btn:active {
  background: #495057;
}

/* Scrollbar styling for the dropdown */
.rephrase-options::-webkit-scrollbar {
  width: 6px;
}

.rephrase-options::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.rephrase-options::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.rephrase-options::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive adjustments */
@media (max-width: 990px) {
  .rephrase-dropdown-portal {
    min-width: 320px;
    max-width: calc(100vw - 40px);
  }

  .rephrase-option-item {
    padding: 12px 14px;
  }

  .rephrase-header {
    padding: 12px 16px 8px;
  }
}

.mobile-rephrase-original-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mobile-rephrase-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-gray-500);
}

.mobile-rephrase-title,
.mobile-rephrase-title-rephrase {
  font-weight: 700;
  font-size: 12px;
  color: var(--color-gray-500);
}

.mobile-rephrase-original-text {
  border: 1px solid var(--border-color);
  padding: 10px;
  background-color: #fbfbfd;
  font-size: 12px;
  color: var(--color-text-505050);
  border-radius: 10px;
}

.mobile-rephrase-original-content {
  font-size: 12px;
  color: var(--color-text-505050);
  border-radius: 10px;
}

.rephrase-header-container {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.rephrase-tooltip-copy-btn {
  background-color: white;

  border: none;
}

.rephrase-tooltip-reload {
  background-color: white;
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid var(--border-color);
}

.btn-text-rephrase {
  font-weight: 700;
  font-size: 14px;
  /* color: #265BAA; */
  /* border-right: 1px solid var(--border-color); */
}

.rephrase-tooltip-copy-btn:hover {
  background-color: var(--color-gray-150) !important;
}

.rephrase-tooltip-reload:hover {
  background-color: var(--color-gray-150) !important;
  /* display: none; */
}
.mobile-rephrase-title-rephrase {
  margin-top: 20px;
}

.premium-rephrase-content {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  margin: auto;
  backdrop-filter: blur(16px) saturate(200%);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.1),
    inset 0 0 16px rgba(255, 255, 255, 1);
  padding: 16px;
  z-index: 1000;
  overflow: hidden;
  transform: translateY(5px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  transform: translateY(5px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* .mode-btn {
  padding: 10px 0px;
  background: var(--color-white);
  color: var(--color-gray-500);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.mode-btn:hover {
  color: var(--color-primary-dark);
}

.mode-btn.active {
  border-bottom: 1px solid var(--color-primary-dark);
  color: var(--color-primary-dark);
  font-weight: 700;
} */
/* Update your existing mode-btn styles with these changes */
.mode-btn {
  padding: 8px 12px;
  margin: 0px 4px;
  background: var(--color-white);
  color: var(--color-gray-500);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  color: var(--color-primary-dark);
  background-color: #f8f9fa;
}

.mode-btn.active {
  background-color: var(--color-primary-dark);
  color: white;
  font-weight: 600;
  border: 1px solid var(--color-primary-dark);
  /* Remove the old border-bottom style */
}

#custom-mode-btn {
  position: relative;
}

.mode-btn {
  cursor: pointer;
}

.standard-mode-btn {
  background-color: #f8f8f8;
  border: 2px solid #4caf50;
  color: #4caf50;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
}

.standard-mode-btn:hover {
  background-color: #e8f5e9;
  transform: translateY(-2px);
}

@media (max-width: 990px) {
  /* .premium-banner-content {
    padding: 20px;
    width: 90%;
  }

  .premium-message {
    font-size: 16px;
  }

  .premium-banner-actions {
    flex-direction: column;
    gap: 10px;
  } */

  .upgrade-btn,
  .standard-mode-btn {
    width: 100%;
    padding: 10px;
  }
}

.mode-selector {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 4px 15px;
  /* border-bottom: 1px solid var(--border-color); */
}

.mode-selector-skeleton {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  padding: 0px;
}

/* Enhanced highlighting styles for paraphrased text */

.highlighted-text {
  display: inline;
  /* padding: 2px 4px; */
  border-radius: 3px;
  transition: all 0.3s ease;
  position: relative;
}

.rephrase-option-text .longest-unchanged,
.paraphrase-option .longest-unchanged {
  /* color: var(--color-blue-200) !important;
  padding: 0px !important; */
}

.rephrase-option-text .changed-word,
.paraphrase-option .changed-word {
  /* color: #e34935 !important;
  padding: 0px !important; */
}

.rephrase-option-text .structural-change,
.paraphrase-option .structural-change {
  /* border-bottom: 1px solid var(--color-yellow-100) !important;
  padding: 0px !important;
  border-radius: 0px !important; */
}

.word-span:hover {
  color: var(--color-primary-dark) !important;
}

/* Hover effects for highlighted text */
.highlighted-text:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* Word spans within highlighted text */
.highlighted-text .word-span {
  padding: 1px 2px;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.highlighted-text .word-span:hover {
  cursor: pointer;
}

/* Tooltip for highlighted sections */
.highlighted-text::before {
  /* content: attr(data-highlight-reason); */
  position: absolute;
  /* content: attr(data-highlight-reason); */
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  /* background-color: #333; */
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  background-color: var(--color-white);
}

.highlighted-text::after {
  /* content: ""; */
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  background-color: var(--color-white);
}

.highlighted-text:hover::before,
.highlighted-text:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Responsive highlighting */
@media (max-width: 990px) {
  .highlighted-text {
    margin: 0 0.5px;
    /* padding: 1px 2px; */
    /* border-left-width: 2px; */
  }

  .highlighted-text:hover {
    transform: scale(1.01);
  }
}

/* Rephrase dropdown header */
/* .rephrase-dropdown-header {
    padding: 12px 16px 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
} */

.rephrase-dropdown-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-grey-900);
  /* color: #666; */
  /* text-transform: uppercase; */
  letter-spacing: 0.5px;
  margin: auto 0 auto 10px;
  font-family: inherit;
}

/* Mode selector container */
.mode-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Updated mode button styles */
.mode-btn {
  padding: 8px 14px;
  background: var(--color-white);
  color: var(--color-text-505050);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
  text-align: center;
  margin: 5px 0;
}

.mode-btn:hover {
  color: var(--color-primary-dark);
  background-color: #f8f9fa;
  border-color: #d0d7de;
}

.mode-btn.active {
  background-color: var(--color-primary-light);
  color: white;
  font-weight: 700;
  border: 1px solid var(--color-primary-light);
}

.line-container {
  white-space: normal;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* // when overflow: hidden is on a parent element */
/* .synonym-dropdown-portal,
.rephrase-tooltip {
    position: fixed !important;
    z-index: 9999 !important;
    transform: none !important;
} */

/* .rephrase-synonyms-feat-container {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    font-family: inherit;
    line-height: inherit;
}

.rephrase-synonyms-feat-container:empty::before {
    content: attr(placeholder);
    color: #B2B2B2;
    pointer-events: none;
    opacity: 1;
}

.rephrase-synonyms-feat-container:focus::before {
    display: none;
} */

/* ************************** Styles for mobile view - Start ************************** */

.mobile-paraphrase-panel,
.mobile-error-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-radius: 15px 15px 0 0;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
  max-height: 70vh;
  overflow-y: auto;
  transition: bottom 0.3s ease;
  z-index: 1000000;
  font-family: Satoshi !important;
}

.mobile-paraphrase-panel.active,
.mobile-error-panel.active {
  bottom: 0;
}

.close-panel-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.paraphrase-option {
  padding: 10px;
  margin: 10px 10px;
  border-radius: 5px;
  cursor: pointer;
  border-bottom: 2px solid #f1f1f1;
}

.paraphrase-option:hover {
  background-color: #f5f5f5;
}

.original-sentence {
  margin: 15px;
}

/* Add this CSS to your styles.css file */

/* Mobile-specific fixes for centering content */
@media (max-width: 990px) {
  .mode-synonym-header {
    padding: 12px 16px;
  }
}

/* Alternative approach - if you want to use flexbox */
@media (max-width: 990px) {
}

/* Mobile Language/Mode Toggle Styles */

/* Hide language section on mobile - we'll show it in the mode area */
@media (max-width: 990px) {
  /* Hide mode selector on mobile */
  .mode-selector {
    display: none !important;
  }

  .dropdown-container {
    display: none;
  }

  .bottom-modal {
    background-color: #fefefe;
    border: 1px solid #888;
    box-shadow:
      0 4px 8px 0 rgba(0, 0, 0, 0.2),
      0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation-name: animatetop;
    animation-duration: 0.4s;
    border-radius: 10px 10px 0 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto; /* center horizontally */
    height: 50vh;
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 16px 16px;
    border-bottom: 1px solid #eee;
  }
  .modal-header h2 {
    color: var(--Humanize-Tropical-Blue-tropical-blue-900, #595a64);
    font-family: Satoshi;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 24px */
  }
  #model-content {
    padding-right: 16px;
    padding-left: 16px;
  }
  #model-content h2 {
    color: var(--color-text-505050);
    font-family: Satoshi;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 24px */
  }

  /* Hide mode selector on mobile */
  .mode-selector {
    display: none !important;
  }

  .dropdown-container {
    display: none;
  }

  .modal {
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 99999999;
  }

  .bottom-modal {
    background-color: #fefefe;
    border: 1px solid #888;
    box-shadow:
      0 4px 8px 0 rgba(0, 0, 0, 0.2),
      0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation-name: animatetop;
    animation-duration: 0.4s;
    border-radius: 10px 10px 0 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 50vh;
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 16px 16px;
    border-bottom: 1px solid #eee;
  }

  .modal-header h2 {
    color: var(--Humanize-Tropical-Blue-tropical-blue-900, #595a64);
    font-family: Satoshi;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
  }

  #modle-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  #modle-content h2 {
    color: var(--color-text-505050);
    font-family: Satoshi;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
  }
}

/* Desktop - keep original behavior */
@media (min-width: 990px) {
  .mode-selector {
    display: flex !important;
  }

  .mode-selector-mobile {
    display: none;
  }

  .mode-selector-mobile {
    display: none;
  }
}

/* Custom scrollbar for mobile language list */
@media (max-width: 990px) {
}

/* Mobile Output Section Layout Changes */

@media (max-width: 990px) {
  .mode-selector-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0px 16px;
  }

  .mode-options-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-grow: 1;
  }

  /* Hide scrollbar for Chrome/Safari */
  .mode-options-container::-webkit-scrollbar {
    display: none;
  }

  .mode-btn {
    flex-shrink: 0;
  }

  .rephrase-tooltip {
    display: none;
  }

  /* Empty state styling for mobile */
  .textarea-container.empty .mobile-paraphrase-container {
    background: #f8f9fa !important;
    opacity: 0.7 !important;
  }

  .textarea-container.empty .mobile-paraphrase-btn {
    background: #6c757d !important;
    cursor: not-allowed !important;
  }
}

/* Desktop - keep original layout */
@media (min-width: 990px) {
  .mobile-paraphrase-container {
    display: none !important;
  }

  .section-dot {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .input-actions-mobile {
    display: none !important;
  }
}

/* Additional mobile refinements */
@media (max-width: 990px) {
  /* Loading indicator adjustments */
  .loading-indicator {
    padding: 20px !important;
    text-align: center !important;
    font-size: 14px !important;
  }
}

/* Mobile tone button styles */
.rephrase-tone-btn {
  padding: 8px 14px;
  margin: 0 4px;
  background: white;
  color: var(--color-text-505050);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #d3d3d3;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
  text-align: center;
  margin-bottom: 5px;
}

.rephrase-tone-btn:hover {
  color: var(--color-primary-light);
  background-color: #f8f9fa;
  border-color: #d0d7de;
}

.rephrase-tone-btn.active-tone {
  background-color: var(--color-primary-light);
  color: white;
  font-weight: 700;
  border: 1px solid var(--color-primary-light);
}

/* ************************** Styles for mobile view - End ************************** */
