.modal-overlay-freeze {
  display: none;
}

.modal-overlay-synonyms {
  display: none;
}

/* Mobile Styles - Bottom Slide Panel */
@media (max-width: 990px) {
  .right-side-panel {
    /* Reset desktop positioning */
    right: auto;
    top: auto;
    width: 100% !important;
    max-width: 100% !important;
    height: 65vh !important; /* Half screen height */

    /* Position at bottom */
    bottom: 0;
    left: 0;

    /* Remove left border, add top border */
    border-left: none;
    border-radius: 10px 10px 0 0;

    /* Update shadow for bottom panel */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);

    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;

    /* Ensure proper stacking */
    z-index: 9999;

    /* Scrollable content */
    overflow-y: auto;
    overflow-x: hidden;

    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
  }

  .right-side-panel.open {
    /* Slide up from bottom */
      transform: translateX(0); /* Slide in */
    transform: translateY(0);
    right: auto; /* Override desktop right positioning */
  }

  /* Panel overlay for mobile */
  .panel-overlay {
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998; /* Below the panel */
  }

  .panel-overlay.show {
    display: block;
    opacity: 1;
  }

  /* Panel header adjustments for mobile */
  .right-side-panel .panel-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-bottom: 1px solid #e9ecef;
  }

  /* Panel content adjustments */
  .right-side-panel .panel-content {
    height: calc(100% - 80px); /* Account for header */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .feature-title h4 {
    margin: 0px;
  }

  /* Panel feature icons adjustment for mobile */
  .right-side-panel .panel-feature-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
  }

  .right-side-panel .panel-icon-item {
    flex: 0 0 auto;
    padding: 8px 12px;
    transition: all 0.2s ease;
    height: 7vh;
  }

  .right-side-panel .panel-icon-item svg{
    height: 20px;
    width: 20px;
    align-self: center;
  }

  .right-side-panel #compare-right-panel svg{
    margin-top: 2px;
    margin-left: 2px;

  }

  .right-side-panel #settings-right-panel svg{
    scale: 1.4;
  }

  .right-side-panel #tone-right-panel svg{
    scale: 1.1;
    margin-right: 1px;
  }



  .right-side-panel .panel-icon-item.active {
    background: #ebf6fa;
    color: white;
    /* border-color: #007bff; */
    border-bottom: 1px solid #265baa;
  }

  /* Close button adjustments */
  .right-side-panel .panel-close-btn {
    /* background: #f8f9fa; */
    /* border: 1px solid #e9ecef;
        border-radius: 50%; */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .right-side-panel .panel-close-btn:hover {
    background: #e9ecef;
    color: #333;
  }

  /* Prevent body scroll when panel is open on mobile */
  body.panel-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* Smooth scrolling for panel content */
  .right-side-panel * {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
  }

  .right-side-panel *::-webkit-scrollbar {
    width: 4px;
  }

  .right-side-panel *::-webkit-scrollbar-track {
    background: transparent;
  }

  .right-side-panel *::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
  }

  .right-side-panel *::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
  }
}

/* Tablet adjustments (990px - 1024px) */
@media (min-width: 990px) and (max-width: 1024px) {
  .right-side-panel {
    /* width: 350px; */
    max-width: 85vw;
  }
}


/* Large desktop adjustments */
@media (min-width: 1400px) {
  .right-side-panel {
    width: 450px;

  }


}

@media (min-width: 1200px) {
  #sentencesWords {
    white-space: nowrap;
    display: flex;
    gap: 4px;
    align-items: center;
  }
  
}

/* Animation classes for smooth transitions */
.slide-up-enter {
  transform: translateY(100%);
  opacity: 0;
}

.slide-up-enter-active {
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.slide-up-exit {
  transform: translateY(0);
  opacity: 1;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .right-side-panel {
    transition: none;
  }

  .panel-overlay {
    transition: none;
  }
}

/* CSS related to bottom model for freeze words */
@media (max-width: 990px) {
  body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .freeze-word-tag{
    display: none !important;
  }
  .modal-overlay-freeze {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999999;
    align-items: flex-end;
  }

  .bottom-modal-freeze {
    background: #fff;
    width: 100%;
    /* max-width: 480px; */
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s;

    display: flex;
    flex-direction: column;
    z-index: 99999999;

    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .bottom-modal-freeze-header {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid var(--Humanize-Grey-grey-100, #d3d3d3);
  }

  .bottom-modal-freeze button {
    color: var(--Humanize-Tropical-Blue-tropical-blue-900, #595a64);
    font-family: Satoshi;
    font-size: 16px;
    padding: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 24px */
  }

  .bottom-modal-freeze h2 {
    color: var(--color-text-505050);
    font-family: Satoshi;
    font-size: 14px;
    padding-left: 6px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
  }

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

  .bottom-modal-freeze-input {
    padding: 16px;
  }

  .bottom-modal-freeze-input h2 {
    color: var(--color-text-505050);
    font-family: Satoshi;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 18px */
    padding-left: 0px;
  }

  .bottom-modal-words-holder {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 8px;
    align-self: stretch;
    border-radius: 10px;
    border-bottom: 1px solid var(--Humanize-Grey-grey-100, #d3d3d3);
    background: var(--color-blue-500);
    height: 20vh;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
  }

  .bottom-modal-freeze-content {
    border-bottom: 1px solid var(--Humanize-Grey-grey-50, #f1f1f1);
    background: #fff;
    padding: 10px;
  }
  #freezeWordsInput {
    border: 2px solid black;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--Humanize-Grey-grey-50, #f1f1f1);
    padding: 5px;
    height: 5vh;
  }
  .bottom-modal-freeze-input-field {
    border: 2px solid black;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--Humanize-Grey-grey-50, #f1f1f1);
    padding: 5px;
    height: 5vh;
  }

  .bottom-modal-freeze-input-field::placeholder {
    color: var(--color-gray-900);
    font-family: Satoshi;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    padding-left: 5px;
    align-items: center;
  }
  .bottom-modal-freeze-buttons {
    display: flex;
    flex-direction: row;
    justify-content: end;
    align-items: center;
    padding-right: 16px;
  }
  .bottom-modal-freeze-buttons #clear-freeze-words {
    font-family: Satoshi;
    font-size: 12px;
    padding: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 24px */
    border: none;
    background: #fff;
  }



  .bottom-modal-freeze-buttons #freeze-words {
    color: var(--white, var(--Base-white, #fff));
    font-family: Satoshi;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%; /* 21px */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--rounded-lg, 8px);
    border: none;
    background: var(--Humanize-Vibrant-blue-vb-500, #265baa);
    height: 4vh;
  }

  .bottom-modal-freeze-buttons #freeze-words svg path {
    fill: white;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .close-btn-freeze {
    float: right;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
  }

  .freeze-word-tag-mobile {
    display: inline-flex;
    align-items: center;
    color: var(--color-gray-400);
    font-size: 12px;
  }

  .freeze-word-tile-mobile {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
}

/* CSS related to bottom model for synonyms words */
@media (max-width: 990px) {
  .synonyms-model-button {
    display: block;
    border-radius: var(--rounded-lg, 8px);
    border: 1px solid var(--Humanize-Grey-grey-50, #f1f1f1);
    background: var(--Humanize-Grey-white, #fff);
  }
  .synonyms-model-bar {
    display: none;
    height: 1.5vh;
    width: 1px;
    background: black;
  }
  .synonyms-model-button-container {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .modal-overlay-synonyms {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999999;
    align-items: flex-end;
    align-items: flex-end;
    justify-content: center;
  }

  .output-area.expanded {
  height: 200px;
  padding: 15px 45px 15px 15px;
  /* Adjust this value as needed */
}

  .bottom-modal-synonyms {
    background: #fff;
    width: 100%;
    /* max-width: 480px; */
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s;

    display: flex;
    flex-direction: column;
    z-index: 99999999;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  .bottom-modal-synonyms-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    padding-bottom: 0px;
  }
  .bottom-modal-synonyms-header h3 {
    overflow: hidden;
    color: var(--Humanize-Grey-grey-800, #3e3e3e);
    text-overflow: ellipsis;
    font-family: Satoshi;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 21px */
  }
  
  .output-expand-fluent-feature{
    display: flex;
    gap: 5px;
  }

  .slide-info-synonyms {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  .freeze-mode-header:hover {
    background-color: inherit !important;
  }
  .response-panel-header{
    display: flex;
    justify-content: space-between;
    padding: 16px 6px;
    border-bottom: 1px solid var(--border-color);
  }

  .response-panel-header h3{
    font-weight: 700;
    font-size: 16px;
    color: var(--color-gray-500);
  }
  .selected-sentence-box{
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    background-color: #FBFBFD;
    font-size: 12px;
    font-weight: 400;
    min-height: 85px;
    overflow-y: scroll;
    color: var(--color-text-505050);
    margin-top: 8px;
  }
  .response-info-title{
    font-weight: 700;
    font-size: 12px;
    color: var(--color-gray-500);
  }
  #panelCloseBtn{
    padding-bottom: 0px;
    align-self: center;
  }
  .word-counter-container{
    position: absolute;
    left: 50%;
    white-space: nowrap;
    top: 0px;
  }

}


@media (min-width: 990px) {
    .clear-freeze-words-desktop{
    font-size: 12px;
    font-weight: 500;
    color: var(--color-primary-light);
    justify-content: end;
    display: flex;
    margin-top: 5px;
    cursor: pointer;
  }

  .clear-freeze-words-desktop:hover{
    color: var(--color-gray-400);
  }

  .output-expand-fluent-feature{
    display: none;
  }

  .output-area {
    /* height: 498px; */
    /* overflow: hidden; */
    padding: 15px 45px 15px 15px;
    transition: height 0.3s ease;
    /* Remove any fixed height you might have */
  } 
}