.new-translator {
    font-family: 'Poppins';
    padding: 20px;
}

.top-headings-div {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;

}



.top-headings-div span {

    font-size: 16px;
    font-weight: 400;
    line-height: 19.2px;
    text-align: center;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: #104165;

}

.top-heading {
    color: #414141 !important;
    font-family: Poppins;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 25.2px !important;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

}

.top-headings-div p {
    margin-bottom: 0;
    color: #111111;
    font-size: 14px;
    font-weight: 400;
    line-height: 16.8px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

}

#showSavedResponsesBtn {
    /* margin-top: 20px; */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
}

.del-history-text {
    color: #E35071;
    font-size: 16px;
    cursor: pointer;
}

.delete-all-history {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.loader1 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 10px;
}

.dotted-loader {
    position: relative;
    width: 16px;
    height: 20px;

}

.dotted-loader .dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #888;
    border-radius: 50%;
    animation: fade 1s linear infinite;
    transform-origin: 10px 10px;
}

/* Create 8 dots positioned in a circle */
.dotted-loader .dot:nth-child(1) {
    transform: rotate(0deg) translateX(8px);
    animation-delay: 0s;
}

.dotted-loader .dot:nth-child(2) {
    transform: rotate(45deg) translateX(8px);
    animation-delay: 0.125s;
}

.dotted-loader .dot:nth-child(3) {
    transform: rotate(90deg) translateX(8px);
    animation-delay: 0.25s;
}

.dotted-loader .dot:nth-child(4) {
    transform: rotate(135deg) translateX(8px);
    animation-delay: 0.375s;
}

.dotted-loader .dot:nth-child(5) {
    transform: rotate(180deg) translateX(8px);
    animation-delay: 0.5s;
}

.dotted-loader .dot:nth-child(6) {
    transform: rotate(225deg) translateX(8px);
    animation-delay: 0.625s;
}

.dotted-loader .dot:nth-child(7) {
    transform: rotate(270deg) translateX(8px);
    animation-delay: 0.75s;
}

.dotted-loader .dot:nth-child(8) {
    transform: rotate(315deg) translateX(8px);
    animation-delay: 0.875s;
}

@keyframes fade {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.copy-btn1:hover,
.delete-btns:hover {
    background: #e0e0e0;
    border-radius: 4px;
}

.copy-btn1,
.delete-btns {
    padding: 3px !important;
}

/* Custom scrollbar styles for Webkit browsers (Chrome, Safari, Edge) */
#savedResponsesList::-webkit-scrollbar {
    width: 11px;
}

#savedResponsesList::-webkit-scrollbar-track {
    background: #F9F9F9;
    border-radius: 4px;
}

#savedResponsesList::-webkit-scrollbar-thumb {
    background: #D1D1D1;
    border-radius: 4px;
    border: 2px solid #F9F9F9;
}

#savedResponsesList::-webkit-scrollbar-thumb:hover {
    background: #B8B8B8;
}

/* ---------------------------------- translator ------------------------------------ */
.dk-translation-box {
    display: flex;
    align-items: center;
    gap: 10px;

}

.dk-language-select {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    padding: 9.5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 151px;
}

.dk-language-select:hover {
    border-color: #e78799;
    box-shadow: 0 2px 8px rgba(231, 135, 153, 0.1);
}

.dk-language-icon {
    display: flex;
    align-items: center;
    justify-content: center;


}

.dk-language-text {
    font-size: 14px;
    color: #606060;

}

.dk-arrow {
    margin-left: auto;

    transition: transform 0.2s ease;
}

.dk-language-select.dk-active .dk-arrow {
    transform: rotate(180deg);
}

.dk-swap-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dk-swap-icon:hover {
    background: rgba(231, 135, 153, 0.1);
    transform: scale(1.1);
}

.dk-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    width: 100%;
    /* padding: 5px 0; */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.dk-dropdown.dk-show {
    display: block;
    animation: dkFadeIn 0.2s ease;
}

.dk-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #606060;
    font-size: 14px;
    font-weight: 400;
}

.dk-dropdown-item:hover {
    background-color: rgba(231, 135, 153, 0.1);
}

@keyframes dkFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dk-dropdown-item.dk-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

.dk-custom-language {
    padding: 8px;
    border-top: 1px solid #eee;
}

.dk-custom-input {
    width: 100%;
    padding: 6px;
    border: .5px solid #ddd !important;
    border-radius: 4px;
    font-size: 14px;
}

.dk-custom-input:focus {
    outline: none;
    border-color: #E24668;
}

/* -------------------------------- lang legend div --------------------------------- */

.lang-legend-div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.toolbar-container {
    display: flex;
    justify-content: center;

}

.toolbar {
    background-color: #F9F9F9;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 8px;
    gap: 10px;
}



/* Toggle section styles */
.toggle-section {
    display: flex;
    align-items: center;
    gap: 7.5px;
    padding: 5px 10px;
    border-right: 1px solid #f3f4f6;
}


/* Switch styles */
.switch {
    position: relative;
    width: 36px;
    height: 20px;
}

.switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 20px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 10px;
    bottom: 5px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch-input:checked+.switch-slider {
    background-color: #141B34;
}

.switch-input:checked+.switch-slider:before {
    transform: translateX(13px);
}

.switch-label {
    color: #111111;
    font-family: Poppins;
    font-size: 11px;
    font-weight: 500;
    line-height: 13.2px;
    text-align: center;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

}

/* ---------------------------------- Textarea feilds -------------------------- */

.text-area-container {
    display: flex;
    justify-content: space-between;
    position: relative;

}

.main-textarea-section {
    flex-basis: 74%;
    display: flex;
    flex-direction: column;
}

/* Top controls */
.top-controls {
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 15px;
    border: 1px solid #D1D1D1;
    background-color: #FDFDFD;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    z-index: 10;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 4.5px;
    justify-content: flex-end;
}

.right-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4.5px;
}

.control-btn {
    padding: 5px;
    border-radius: 9999px;
    border: none;
    background: none;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;

}

.control-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.control-btn:focus {
    background: none;
}

#clearBtn:hover,
#revertBack:hover {
    background-color: #E6E6E6 !important;
    color: #374151 !important;

}

#mainSwitcher:disabled {
    opacity: 1 !important;
    cursor: not-allowed;
}

#mainSwitcher:disabled svg {
    opacity: 0.5;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#clearBtn {
    margin-right: 5px;
    margin-left: 5px;
}

#revertBack {
    margin-right: 7px;
    margin-left: 7px;
}

.textarea-wrapper {
    height: auto;
    min-height: 320px;
    background-color: #F9F9F9;
    border: 1px solid #D1D1D1;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow: hidden;
}

#inputText {
    color: #414141 !important;
    background-color: #F9F9F9 !important;
    font-family: Poppins !important;
    height: auto;
    overflow: hidden;
    position: relative;
    font-size: 16px;
    outline: none;
    margin-bottom: 0 !important;

    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    width: 100%;
    padding: 16px;
    /* word-break: break-all !important; */
}

#inputText * {
    color: #414141 !important;
    background-color: #F9F9F9 !important;
    font-family: Poppins !important;
    font-size: 16px !important;
    text-align: left !important;
    /* border: none !important; */
    line-height: 25px;
}

#inputText blockquote {
    border-left: 3px solid !important;
}

/* Placeholder styling */
#inputText.is-empty::before {
    content: attr(placeholder);
    position: absolute;
    top: 0;
    left: 0;
    padding: inherit;
    color: #888 !important;
    pointer-events: none;
}

/* Force empty elements to minimum height */
#inputText.is-empty {
    height: auto !important;

}


.text-area ul,
.text-area .editor-list {
    list-style-type: disc !important;
    margin-left: 20px !important;
    padding-left: 20px !important;
}

.text-area ol {
    list-style-type: decimal !important;
    margin-left: 20px !important;
    padding-left: 20px !important;
}

.text-area li,
.text-area .editor-list-item {
    display: list-item !important;
    list-style-position: outside !important;
}

.text-area p {
    /* margin: 0 !important; */
}

.markdown-body {
    background-color: #fff !important;
    color: #414141 !important;
    font-size: 16px !important;
}

.markdown-body table {
    width: 100% !important;
}

#inputText .markdown-body table tr {
    background-color: white !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {

    border-bottom: none !important;
    font-size: 16px !important;
}

.textarea-wrapper {
    width: 100%;
    position: relative;
    height: 100%;
}



/* ------------------------- correction options ------------------------- */

.correction-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px;
    justify-content: center;
    align-items: center;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #FDFDFD;
    border-radius: 7.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #E6E6E6;
    padding: 10px;

}

.options-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    font-size: 14px;
    color: #414141;
    border: none;
    background: #F6F6F6;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background-color: #f9fafb;
    color: #1f2937;
}

.option-btn:hover {
    background-color: #f9fafb !important;
    color: #1f2937 !important;
}

.option-btn:focus {
    background-color: #f9fafb !important;
    color: #1f2937 !important;
}

#rewriteBtn:hover {
    color: #E24668;
    background-color: #FCEDF0 !important;
}

.divider {
    color: #e5e7eb;
}

/* Bottom controls */
.bottom-controls {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}


.write-applicationDiv {

    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;

    background-color: white;
    color: white;
    border: 1px solid grey;
    margin-top: 0 !important;
}

.next-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;

    padding: 12px 40px;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: transform 0.1s ease, box-shadow 0.3s ease, filter 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

/* -------------------------- clear btn ---------------------------------- */
#clearBtn {
    cursor: pointer;
    transition: all 0.2s ease;
}

#clearBtn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

#clearBtn:not(:disabled):hover {
    opacity: 0.8;
}

#clearBtn:not(:disabled):active {
    opacity: 0.6;
}



/* ----------------------------------- correction sidebar ------------------------ */
.correction-sidebar.hidden {
    display: none;
}

.correction-sidebar {
    transition: display 0.3s ease;
}

.correction-sidebar {
    flex-basis: 25%;
    background: #F9F9F9;

    border-top-right-radius: 7.5px;
    border-bottom-right-radius: 7.5px;
    display: flex;
    flex-direction: column;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border: 1px solid #D1D1D1;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}



.header-section {
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #D1D1D1;
    position: sticky;
    padding: 11px 15px;
    background-color: #FDFDFD;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    z-index: 10;
    font-size: 9px;
    gap: 10px;
}

.analysis-card {
    width: 91%;
    margin: 0 auto;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.analysis-title {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #1a1a1a;
    font-weight: 600;
}

.analysis-title-subtitle {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.analysis-subtitle {
    color: #414141;
    font-family: Poppins;
    font-size: 11px;
    font-weight: 400;
    line-height: 12.6px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

}

.warning-message {

    display: flex;
    align-items: center;
    gap: 8px;
    color: #414141;
    font-family: Poppins;
    font-size: 12px;
    font-weight: 400;
    line-height: 12.6px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    background-color: #E7ECF0;

}

.warning-inner {
    display: flex;
    align-items: center;
    padding: 14px 0px;
    margin-left: 5%;
    margin-right: 5%;
    gap: 5px;

}

.style-conversion {

    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.style-label {
    padding: 6px 14px;
    border-radius: 4px;
}

.style-label.informal {
    background: #E7ECF099;
    color: #606060;
    font-family: Poppins;
    font-size: 12px;
    font-weight: 400;
    line-height: 12.6px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

}

.style-label.professional {
    background: #FCEDF0;
    color: #E24668;
    font-family: Poppins;
    font-size: 12px;
    font-weight: 400;
    line-height: 12.6px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

}


.action-button {
    background: #E75D77;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
    width: 91%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-button:hover {
    background: #d84d68;
}

.correction-inner {

    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* --------------------------- change style content ----------------------- */


/* Layout styling for content containers */
.correction-inner {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 16px 0px;
    transition: none;
    height: 100%;
    border-top: 1px solid #D1D1D1;
}

.style-inner {

    flex-direction: column;
    gap: 12px;
    padding: 4px 20px;
    transition: none;
    border-top: 1px solid #D1D1D1;
}

.style-option {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid #F4F4F4;
}

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

.style-option:nth-child(1):hover {
    background-color: rgba(59, 130, 246, 0.1);
    /* #convencing */
}

.style-option:nth-child(2):hover {
    background-color: rgba(16, 185, 129, 0.1);
    /* #simplify */
}

.style-option:nth-child(3):hover {
    background-color: rgba(236, 72, 153, 0.1);
    /* #elaborate */
}

.style-option:nth-child(4):hover {
    background-color: rgba(124, 58, 237, 0.1);
    /* #concise */
}

.style-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
}

.style-icon.formal {
    background-color: #e8eaff;
    color: #6b77ff;
}

.style-icon.chat {
    background-color: #e6faea;
    color: #2ed573;
}

.style-icon.book {
    background-color: #fff0ff;
    color: #cd84f1;
}

.style-icon.humor {
    background-color: #fff4e4;
    color: #ffaf40;
}

.style-content {
    flex: 1;
}

.style-title {
    font-size: 14px;
    font-weight: 500;
    color: #414141;
    margin-bottom: 4px;
}

.style-description {
    font-size: 12px;
    color: #414141;
    line-height: 1.4;
}


.ai-analysis-text {
    color: #104165;
    font-family: Poppins;
    font-size: 12px;
    font-weight: 500;
    line-height: 15.4px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;

}

.search-icon {
    background-color: #E7ECF0;
    display: flex;
    padding: 3px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
}

.demo-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto 0;
}

#gif {

    /* margin-bottom: 10px; */
}

#gif svg {
    width: 90px !important;
    height: 90px !important;
    margin-bottom: -20px;
}


.correction-inner-main {
    display: flex;
    flex-direction: column;
    gap: 16px;

    transition: none;
    height: 100%;
}

.correction-message {
    display: flex;
    align-items: center;
}

.correction-message span {
    font-size: 14px;
    color: #4a4a4a;
    line-height: 25.2px;
}

/* Update these styles */
.main-textarea-section,
.correction-sidebar,
#inputText {
    transition: none;
    min-height: 0;
    /* Remove any minimum height constraints */
}

.correction-inner,
.style-inner {
    /* ! i made this change to see if it works */
    /* min-height: 0; */
    /* Remove any minimum height constraints */
}

.header-section {
    display: flex;
    flex-wrap: wrap;
    /* Allow items to wrap */
    gap: 10px;
    /* Space between wrapped items */
    min-height: fit-content;
    /* Ensure it grows with content */
}

/* --------------------- new header ---------------------------- */


.hk-dropdown-container {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.hk-dropdown-button {
    width: 100%;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hk-dropdown-button:hover {
    border-color: #e78799;
    background-color: transparent !important;
    box-shadow: 0 2px 8px rgba(231, 135, 153, 0.1)
}

.hk-dropdown-button:focus {
    border-color: #e78799;
    background-color: transparent !important;
    box-shadow: 0 2px 8px rgba(231, 135, 153, 0.1)
}


.selected-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hk-dropdown-text {
    flex-grow: 1;
    text-align: left;
    font-size: 14px;
    color: #606060;
}

.hk-dropdown-arrow {
    transition: transform 0.2s ease;
}

.hk-dropdown-button.active .hk-dropdown-arrow {
    transform: rotate(180deg);
}

.hk-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 5px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.hk-dropdown-content.show {
    display: block;
}

.hk-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hk-dropdown-option span {
    font-size: 14px;
    color: #606060;
}

.hk-dropdown-option:hover {
    background-color: rgba(231, 135, 153, 0.1);
}

.hk-dropdown-option svg path {
    transition: stroke 0.2s ease;
}

.hk-dropdown-option.active svg path {
    stroke: #E24668;
}

.correction-inner,
.style-inner {
    display: none;
}

.correction-inner.active,
.style-inner.active {
    display: flex;
}

/* ------------------------------- loader styling ---------------------- */

.loader-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    /* border: 1px solid #D1D1D1; */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.bubble-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-right: 9px;
    height: 60px;
}

.bubble {
    position: relative;
    /* Added for ripple effect */
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff9daf;
    animation: bubble-animation 1.8s ease-in-out infinite;
}


@keyframes bubble-animation {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(3);
        opacity: 0.8;
    }
}

.bubble::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #ff9daf;
    opacity: 0.7;
    animation: ripple 1.8s ease-in-out infinite;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }

    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.loader-text {
    font-family: Poppins;
    color: #414141;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* ------------------------------- mic loader ----------------------------------- */
.loader {
    display: flex;
    align-items: center;
    margin-right: 6px;
}

.dotted-loader {
    position: relative;
    width: 16px;
    height: 20px;

}

.dotted-loader .dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #888;
    border-radius: 50%;
    animation: fade 1s linear infinite;
    transform-origin: 10px 10px;
}

/* Create 8 dots positioned in a circle */
.dotted-loader .dot:nth-child(1) {
    transform: rotate(0deg) translateX(8px);
    animation-delay: 0s;
}

.dotted-loader .dot:nth-child(2) {
    transform: rotate(45deg) translateX(8px);
    animation-delay: 0.125s;
}

.dotted-loader .dot:nth-child(3) {
    transform: rotate(90deg) translateX(8px);
    animation-delay: 0.25s;
}

.dotted-loader .dot:nth-child(4) {
    transform: rotate(135deg) translateX(8px);
    animation-delay: 0.375s;
}

.dotted-loader .dot:nth-child(5) {
    transform: rotate(180deg) translateX(8px);
    animation-delay: 0.5s;
}

.dotted-loader .dot:nth-child(6) {
    transform: rotate(225deg) translateX(8px);
    animation-delay: 0.625s;
}

.dotted-loader .dot:nth-child(7) {
    transform: rotate(270deg) translateX(8px);
    animation-delay: 0.75s;
}

.dotted-loader .dot:nth-child(8) {
    transform: rotate(315deg) translateX(8px);
    animation-delay: 0.875s;
}

@keyframes fade {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

#genderSelector span {
    display: flex;
    align-items: center;
    justify-content: center;
}

#genderSelector {
    padding: 7px;
}

.gender-option {
    gap: 4px;
    border-radius: 5px;
    padding: 7px 9px !important;
}

#stopBtn,
#pausePlayBtn {
    position: relative;
}

#stopBtn::after,
#pausePlayBtn::after {
    content: "";
    position: absolute;
    top: 27%;
    right: 0;
    height: 50%;
    width: 0.7px;
    background-color: #D6D6D6;
}

#stopBtn:focus,
#pausePlayBtn:focus,
#downloadBtn:focus {
    background-color: transparent !important;
}

/* ------------------------ show saved history ------------------------------ */

.popup {
    display: none;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.popup-content {
    background-color: #F9F9F9;
    padding: 20px;
    border: 1px solid #888;
    width: 60%;
    height: 80%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

.hClose {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#savedResponsesList {
    flex-grow: 1;
    overflow-y: auto;
    margin: 0 -10px;
    /* Adjust as needed */
    padding: 0 10px;
    padding-right: 4px;
    /* Adjust as needed */
}

.delete-all-history {
    flex-shrink: 0;
    margin-top: 20px;
}

/* Rest of your existing CSS remains the same */
.close {
    cursor: pointer;
    margin-right: -12px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.saved-response {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #E6E6E6;
    border-radius: 8px;
    color: black;
    border-color: #E6E6E6;
    background-color: #FFFFFF;
    padding: 13px !important;
}

.copy-button-container {
    display: flex;
    margin-left: 5px;
    justify-content: flex-end;
}

.left-history-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#popup-heading {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 400;
    color: #626262;
    margin-top: 1px;
}

.copy-btn1 {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.saved-response textarea {
    width: 100%;
    overflow: hidden;
    resize: none;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    padding: 0;
    margin: 0;
}

textarea.no-min-height {
    min-height: 0;
}

.button-container {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 1px;
    margin-right: -4px;
}

.delete-btns {
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.button-container.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ---------------------  new rewrite code -------------------------------------- */
/* =============================================================== rewrite modal =========================================== */
/* Modal styles */
.dk-hamdan-modal-container {
    width: 550px;
    max-width: 95vw;
    background: white;
    border-radius: 5px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Header styles */
.dk-hamdan-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.dk-hamdan-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 4px 0;
}

.dk-hamdan-modal-subtitle {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
}

.dk-hamdan-close-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 5px;
    transition: all 0.2s;
}

.dk-hamdan-close-button:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Options grid */
.dk-hamdan-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.dk-hamdan-option-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    white-space: pre-wrap;
}



.dk-hamdan-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;

}



.dk-hamdan-option-title {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

.dk-hamdan-option-description {
    font-size: 13px;
    color: #4b5563;
    text-align: center;
}

/* Custom input section */
.dk-hamdan-custom-input-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 16px;
    transition: all 0.2s;
}


.dk-hamdan-custom-input-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dk-hamdan-custom-input-label {
    background: white;
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dk-hamdan-input-container {
    position: relative;
}

.dk-hamdan-custom-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 0.5px solid #e5e7eb !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    outline: none !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
    background-color: white !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    padding-right: 110px !important;
}


.dk-hamdan-custom-input:focus {
    border-color: rgb(232, 107, 134) !important;
    /* focus:border-transparent */
    box-shadow: 0 0 0 2px rgb(232, 107, 134);
}

.dk-hamdan-custom-input:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    /* hover:shadow-md */
}

.dk-hamdan-custom-input::placeholder {
    color: #9ca3af;
}

.dk-hamdan-enter-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.dk-hamdan-enter-key {
    background: #e5e7eb;
    color: #4b5563;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Icons */
.dk-hamdan-icon {
    width: 20px;
    height: 20px;
    color: rgb(232, 107, 134);
}

.dk-hamdan-icon-small {
    width: 16px;
    height: 16px;
}

.dk-hamdan-modal-container {
    display: none;

}


#convencing:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

#simplify:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

#elaborate:hover {
    background-color: rgba(236, 72, 153, 0.1);
}

#concise:hover {
    background-color: rgba(124, 58, 237, 0.1);
}

.clear-icon {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 5px;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: rgb(232, 107, 134);
    cursor: pointer;
    display: none;
    /* Hidden by default */
    padding: 5px;
}

.clear-icon:hover {

    background-color: rgba(128, 128, 128, 0.232);
    border-radius: 5px;

}

/* ------------------------------ navigation buttons ------------------------- */
.counter-nav-div {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 15px;
    /* Allows for centering with absolute positioning */
}



/* ------------------------ Response navigation ------------------------------ */
.response-navigation {

    align-items: center;
    padding: 5px;
    flex-basis: calc(50% - 43px);
    gap: 15px;
    justify-content: flex-start;
    display: none;

}

.nav-icons-div {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #667185;
    padding: 5px;
    border-radius: 6px;
}

.response-navigation button {
    border: none;
    background-color: transparent;
    display: flex;
    align-items: center;
    padding: 0;

}

.response-counter {

    font-family: Poppins;
    font-size: 14px;
    font-weight: 500;
    line-height: 16.8px;
    text-align: center;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: #414141;
    white-space: nowrap !important;

}

/* ----------------- mic CSS ----------------- */
.lucide-mic.listening-glow {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        filter: drop-shadow(0 0 5px #28a745);
    }

    50% {
        filter: drop-shadow(0 0 15px #28a745);
    }

    100% {
        filter: drop-shadow(0 0 5px #28a745);
    }
}

/* --------------------- circle loader ------------------- */
.gradient-loader {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg,
            rgba(226, 70, 104, 0.2),
            rgba(226, 70, 104, 1),
            rgba(226, 70, 104, 0.2));
    background-size: 200% 100%;
    animation: gradient-move 1.5s ease-in-out infinite;
}

@keyframes gradient-move {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* ------------------------------ Media Queries ------------------------ */

/* Large Desktop (1200px and above) */
@media screen and (min-width: 1200px) {
    .options-container {
        padding: 10px 20px;
    }

    .options-row {
        gap: 15px;
    }


}

/* Desktop and Small Laptop (992px to 1199px) */
@media screen and (max-width: 1199px) {
    .options-container {
        max-width: 95%;
    }

    .lower-container {
        width: 100% !important;
    }
}

/* Tablet Landscape (768px to 991px) */
@media screen and (max-width: 991px) {
    .options-row {
        gap: 10px;
        padding: 5px;
        justify-content: center;
    }

    .option-btn {
        flex: 0 1 auto;
    }

    .divider {
        display: none;
        /* Hide divider on smaller screens */
    }

    .toolbar {
        display: none;
    }

    .lang-legend-div {
        justify-content: center;
    }


}

/* Tablet Portrait (576px to 767px) */
@media screen and (max-width: 767px) {
    .options-container {
        padding: 7.5px;
    }

    .options-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .option-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    /* Adjust spacing for read button icons */
    .lucide-volume-2,
    .lucide-pause {
        width: 18px;
        height: 16px;
    }

    /* Stack buttons vertically */
    .rewrite-btn {
        margin-top: 8px;
        order: -1;
        /* Move rewrite button to top on mobile */
    }
}

/* Mobile (575px and below) */
@media screen and (max-width: 575px) {
    .correction-options {
        margin-top: 10px;
    }

    .options-container {
        padding: 5px;
        border-radius: 8px;
    }

    .option-btn {
        font-size: 13px;
        padding: 10px;
    }

    .option-btn svg {
        width: 16px;
    }

    /* Adjust text spacing */
    .option-btn span {
        font-size: 13px;
    }
}

/* Small Mobile (360px and below) */
@media screen and (max-width: 360px) {
    .options-container {
        padding: 5px;
    }

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

    .option-btn svg {
        width: 14px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .option-btn {
        min-height: 44px;
        /* Better touch target */
        padding: clamp(12px, 1.5vw, 16px);
    }

    /* Increase tap target area */
    .option-btn+.option-btn {
        margin-top: 8px;
    }
}



/* Ensure proper button behavior when keyboard is visible */
@media screen and (max-height: 500px) {
    .options-container {
        position: static;
        transform: none;
    }

    .options-row {
        flex-wrap: wrap;
        flex-direction: row;
    }


}

/* High DPI Screens */
@media screen and (min-resolution: 192dpi) {
    .option-btn svg {
        stroke-width: 1.25;
    }
}

/* Print Styles */
@media print {
    .correction-options {
        display: none !important;
    }
}






@media screen and (max-width: 767px) {
    .options-container {
        padding: 7.5px;
    }

    .options-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
        padding: 5px;
    }



    /* Base styles for all buttons */
    .option-btn {
        width: 100%;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        white-space: nowrap;
        background-color: white;
        border: 1px solid #E6E6E6;
        border-radius: 6px;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* Explicit order for each button */
    #copyBtn {
        order: 1;
    }

    #readBtn {
        order: 2;
    }

    .download-container {
        order: 3;
    }

    .rewrite-btn {
        order: 4;
        background-color: #FCEDF0;
        color: #E24668;
    }

    /* Remove the divider */
    .divider {
        display: none;
    }

    /* Consistent icon styling */
    .option-btn svg {
        width: 16px;
        height: 16px;
        margin-right: 8px;
        flex-shrink: 0;
    }

    /* Consistent text styling */
    .option-btn span {
        font-size: 14px;
        line-height: 1;
        white-space: nowrap;
    }

    .dk-translation-box {
        gap: 0px;
    }

    .dk-language-select {
        min-width: 0 !important;
        justify-content: center;
    }

    .word-nav-div {
        display: flex;
        justify-content: center;
        flex-direction: column-reverse;
        align-items: center;
    }

    .popup-content {
        background-color: #F9F9F9;
        margin: 15% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 90%;
        height: 80%;
        max-height: 1000px;
        overflow: scroll;
        position: relative;
        border-radius: 10px;
    }
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
    .option-btn {
        min-height: 44px;
        height: 44px;
    }
}



@media screen and (max-width: 399px) {
    .options-row {
        grid-template-columns: 1fr;
        /* Single column layout */
        grid-template-rows: auto;
        /* Adjust rows based on content */
        gap: 8px;
        /* Maintain spacing between buttons */
        padding: 5px;
    }
}

@media screen and (max-width: 450px) {
    .word-counter-div {
        display: flex;
        flex-direction: column-reverse !important;
        flex-wrap: wrap;
    }
}

/* --------------------------------- limited divs CSS ------------------------ */
.word-count {
    text-align: center;
    display: flex;
    justify-content: center;
}

.word-count {
    font-size: 14px;
}

.word-counter-div {
    display: flex;
    align-items: center;


    justify-content: center;

}

textarea {
    overflow: hidden;
    resize: none;
}

.word-nav-div {
    display: flex;
    justify-content: center;
}

/* --------------------------------- download-------------------------------- */
.download-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 200px;
    margin-top: 4px;
}

.download-option {
    padding: 8px 16px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s;
}

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



/* =========================== input field =========================== */
/* Hide the default Quill toolbar */
.ql-toolbar.ql-snow {
    display: none;
}

/* Style the editor to match the original textarea */
.ql-container.ql-snow {
    border: none;
    font-family: inherit;
    font-size: inherit;
}

#editor-container {
    width: 100%;
    height: 100%;
    min-height: 200px;
}

#editor {
    width: 100%;
    height: 100%;
    min-height: 200px;

    font-size: 16px;
}

.ql-editor {
    padding: 20px;
    min-height: 200px;
}

.ql-editor.ql-blank::before {
    color: rgba(0, 0, 0, 0.6);
    content: attr(data-placeholder);
    font-style: normal;
    left: 20px;
    pointer-events: none;
    position: absolute;
    right: 15px;
}

#editor * {
    color: #414141 !important;
    background-color: #FFF !important;
    font-family: Poppins !important;
    /* font-size: 16px !important; */
    text-align: left !important;
    /* border: none !important; */
    line-height: 28px;

}

#uploadImg {
    margin-left: 3px;
}

.revert-clear-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #F5F5F5;
    border-radius: 8px;
    padding: 3.5px 2px;
}

.vertical-hr {
    border: none;
    border-left: 1px solid #D9D9D9;

    height: 15px;

    width: 0;

}

#editor h1 {
    font-size: 16px !important;
}

#editor h2 {
    font-size: 16px !important;
}

#editor h3 {
    font-size: 16px !important;
}

#editor h4 {
    font-size: 16px !important;
}

#editor h5 {
    font-size: 16px !important;
}

#editor h6 {
    font-size: 16px !important;
}

.ql-editor>h1:first-child+p>br:only-child,
.ql-editor>h2:first-child+p>br:only-child,
.ql-editor>h3:first-child+p>br:only-child,
.ql-editor>h4:first-child+p>br:only-child,
.ql-editor>h5:first-child+p>br:only-child,
.ql-editor>h6:first-child+p>br:only-child {
    display: none !important;
}

.ql-editor ol {
    margin: 16px 0 !important;
}

.ql-editor ul {
    margin: 16px 0 !important;
}

.ql-editor p {
    margin: 0 0 5px !important;
}

.ql-container {
    overflow-anchor: none;
}

.ql-container,
.ql-editor {
    overflow: hidden !important;
    max-height: none !important;
}



.ql-table-menus-container {
    display: none !important;
}

.ql-operate-line-container {
    display: none !important;
}

.ql-table-better {
    margin-bottom: 20px !important;
}

.ql-editor table {
    font-size: 16px !important;
}

.hamdan-robot-container {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.hamdan-speech-bubble {
    position: absolute;
    bottom: calc(100% - 0px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 30%, #ffffff 70%, #f8fafc 100%);
    color: #1e293b;
    padding: 15px 18px;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.4px;
    line-height: 1.3;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.04), 0 12px 24px rgba(15, 23, 42, 0.03), 0 6px 12px rgba(15, 23, 42, 0.02), 0 2px 4px rgba(15, 23, 42, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(148, 163, 184, 0.04);
    white-space: nowrap;
    animation: hamdan-fadeInScale-5115 2s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(20px) saturate(1.2);
    z-index: 10;
}

.hamdan-speech-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    pointer-events: none;
    border-radius: 28px;
    opacity: 0.8;
}

.hamdan-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.03)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.02));
}



@keyframes hamdan-fadeInScale-5115 {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.8);
    }

    60% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}



.char-limit-warning-limited {
    color: rgb(96, 96, 96);
    font-size: 14px !important;
    margin-bottom: 0px !important;
}


.char-limit-warning-red {
    color: #E24668 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}