*{
    padding: 0;
    margin: 0;
}

body,html{
    width: 406px;
    height: 600px;
}
header{
    position: relative;
    width: 406px;
    height: 645px;
    background: rgba(218, 241, 242, 1);
}

select{
    outline: none;
    border: none !important;
}

.mx-2 {
    margin-left: 8px;
    margin-right: 8px;
}
.language-select-container {
    display: flex;
    flex-direction: row;
    position: relative;
    width: 169px;
    background-color: #fff;
    height: 56px;
    border-radius: 12px;
}
.language-select-container label {
    position: absolute;
    bottom: 10px;
    left: 12px;
    font-size: 12px;
    color: rgba(0,0,0, 0.6);
    line-height: 12px;
    margin: 0;
}

.min-select-container:hover,
.language-select_:hover,
.language-select-container:hover,
.widget-item:hover,
.translate-mode:hover {
    background-color: rgb(242, 244, 246,.9);
}

.translateHover:hover{
    background: rgba(0, 201, 213, 1);
}
select.language-select,
select.translate-service,
select.min-select {
    --form-element-spacing-horizontal: 0;
    margin-bottom: 0;
    max-width: 158px;
    width: 158px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    padding-left: 0;
    background-position: center right 10px;
    background-size: 16px auto;
    background-color: transparent;
    box-shadow: unset !important;
    cursor: pointer;
}

.service {
    display: flex;
    flex-wrap: wrap; /* 保证容器内元素灵活适应宽度 */
    gap: 13px; /* 设置两个 div 之间的间隔 */
    border: 1px solid transparent;
    border-radius: 8px;
    margin: 12px 16px;

    width: 374px;
}
.login{
    position: absolute;
    top:14px;
    left: 16px;
    width: 72px;
    height: 32px;
    border-radius: 6px;
    color:rgba(255, 255, 255, 1);
    font-family: PingFang SC;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-align: center;
    border: none;
    background:  rgba(0, 170, 181, 1);
;
}
.hover:hover{
    cursor: pointer;
}
.min-select-container_ {
    display: flex;
    align-items: center;
    flex: 1; /* 平分宽度，确保两个子元素时能各占一半 */
    height: 44px;
    border-radius: 8px;
    width: 374px;
    background: #fff;
}

.min-select-container_ label {
    font-size: 14px;
    font-weight: 400;
    padding-left: 12px;
    color: rgba(31, 41, 67, 0.6);
    cursor: default;
}

.min-select-container_ select {
    flex: 1; /* 让 select 自适应父容器宽度 */
    max-width: 100%; /* 确保 select 最大宽度不超过父容器 */
    font-weight: 500;
    font-size: 16px;
    color: rgba(31, 41, 67, 1);
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-right: 12px;
    padding-left: 8px;
    cursor: pointer;
}

.center{
    justify-content: center; /* 水平居中 */
    align-items: center;
}
.service > .min-select-container_:only-child {
    flex-basis: 100%; /* 当只有一个 div 时，占满父容器宽度 */
}
select.language-select {
    color: black;
    font-size: 14px;
    padding: 8px 0 30px 8px;
    position: absolute;
    border-radius: 8px;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border: #fff;
}

.language-select-container label {
    position: absolute;
    bottom: 10px;
    left: 12px;
    font-size: 12px;
    line-height: 12px;
    margin: 0;
}

.webTranslateContainer{
    display: flex;
    /*position: absolute;*/
    margin-top:48px;
    margin-left: 16px;
    flex-direction: row;
}

.selectContainer{
    display: flex;
    width: 183px;
    height: 44px;
}
.config {
    background-color: #f5f5f5;
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;

}

.flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

select {
    background: none;
    border: none;
    color: rgb(29, 37, 59);
    font-size: 14px;
    width: 70%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

input[type="checkbox"].switch {
    width: 40px;
    height: 20px;
}


#loading{
    text-align: center;
    border: 1px solid transparent;
    width: 221px;
    height: 20px;
color: rgba(255, 71, 115, 1);
    font-size: 14px;
    margin-top: 8px;
    margin-left: 15px;
    overflow: hidden;
    .lables{
        max-width: 180px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

/* Optional: to make the config box responsive */
@media (max-width: 600px) {
    select {
        width: 60%;
    }
}

.selectController{
    background: rgba(244, 245, 247, 1);
    border-radius: 8px;
}
.settingIcon:hover{
    opacity: 1 !important;
}
.webTitle{
    position: absolute;
    left: 16px;top: 16px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-align: left;
    color: rgba(0, 170, 181, 1);
}
.options{
    /*position: absolute;*/
    margin: 12px 16px 12px 240px;
    height: 20px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: right;
    color: rgba(31, 41, 67, 0.6);
}

.mainContainer:has(.loading) .options{
    margin: 8px 16px 8px 240px !important;
}

.mainFooter{
    position: relative;

}


.loadingContainer {
    position: relative;
}

.loadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    bottom:0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}



.textArae {
    resize: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: rgba(31, 41, 67, 0.8); /* Adjusted color for content */
    padding: 8px 32px 8px 8px;
    overflow-y: auto; /* Ensure long content is scrollable */
    word-wrap: break-word; /* Ensure long words wrap to the next line */
    white-space: pre-wrap; /* Preserve whitespaces and ensure text wraps */
}

.greenText {
    position: absolute;
    border-radius: 8px;
    left: 16px;
    top: 48px;
    width: 374px;
    height: 78px;
    border: 1px solid rgba(0, 170, 181, 1);
    background-color: white;
}

.grayText {
    border: none !important;
    position: absolute;
    border-radius: 8px;
    left: 16px;
    top: 134px;
    width: 374px;
    height: 78px;
    background: rgba(244, 245, 247, 1);
    display: flex;
    font-size: 14px;
    color: #000;
    padding: 8px 32px 8px 8px;
    overflow-y: auto; /* Ensure long content is scrollable */
    word-wrap: break-word; /* Ensure long words wrap to the next line */
    white-space: pre-wrap; /* Preserve whitespaces and ensure text wraps */
    p{
        max-width: 250px; /* 限制文字的最大宽度 */
        word-wrap: break-word; /* 在需要时进行换行 */
    }
}

/* Placeholder styling for contenteditable divs */
.textArae[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: rgba(31, 41, 67, 0.4);
    pointer-events: none;
    display: block; /* Ensures the placeholder behaves like block-level element */
}

.clear-icon {
    position: absolute;
    bottom: 199px; /* Distance from the top */
    right: 38px; /* Distance from the right */
    width: 20px; /* Adjust the size of the icon as needed */
    height: 20px;
    cursor: pointer;
}
.loadingContainer {
    position: relative;
    width: 100%;
    height: 100%;
}

.loadingContainer .loading_ {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}
.translateSelect{
    border-radius: 8px;
    width: 169px;
    height: 44px;
    background: rgba(244, 245, 247, 1);
    color: rgba(31, 41, 67, 1);
    font-family: Inter;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;


}


.translateButton{
    border: none;
    background: rgba(0, 170, 181, 1);
    border-radius: 8px;
    width: 183px;
    height: 44px;
    color: rgba(255, 255, 255, 1);
    font-family: Inter;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
}

main{
    position: absolute;
    top: 183px;
    border-radius: 16px 16px 0 0 ;
    width: 406px;
    height: 462px;
    background: #fff;
}

.pdf{
    position: absolute;
    right: 16px;
    bottom: 12px;
    box-sizing: border-box;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center; /* 水平居中 */
    line-height: 40px;
    background: rgba(244, 245, 247, 1);
    border-radius: 8px;
    padding: 10px 8px 10px 2px;
    width: 229px;
    height: 40px;
    font-size: 14px;
    border: 1px dashed rgba(211, 218, 236, 1);
    img{
        margin-right:1.67px;
        vertical-align: middle;
    }
    span{
        vertical-align: middle;
    }
}
.pdf:hover{
    cursor: pointer;
}

.feedback{
    position: absolute;
    left: 28px;
    bottom: 22px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    color: rgba(116, 123, 139, 1);

}

.container {
    transition: transform 0.3s ease-out;
}

.drawer {
    height: 0;
    overflow: hidden;
    background-color: #f0f0f0;
    transition: height 0.3s ease-out;
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.svgContainer{
    transition: transform 0.3s ease-in-out;
}
.icon{
    transition: opacity 0.3s ease-in-out;
}
.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}
.visible {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}


.drawer-open .drawer {
    width: 406px;
    height: 120px; /* 设置抽屉打开时的高度 */
    box-sizing: border-box;
}

.flex {
    display: flex;
}
.mt-4 {
    margin-top: 16px;
}
.items-center {
    align-items: center;
}

.config {
    background-color: #f5f5f5;
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.config select {
    background: none;
    border: none;
    color: rgb(29, 37, 59);
    font-size: 14px;
    width: auto;
    max-width: calc(100% - 40px);  /* 让 select 可以最大程度使用剩余空间，但不挤压 switch */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 超出部分省略 */
    display: inline-flex; /* 改成 inline-flex 确保短文本时不会撑满 */
}


input[type="checkbox"].switch {
    width: 40px;
    height: 20px;
}


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

input[type='checkbox'].switch{
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    width: 35px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
}

input[type='checkbox'].switch:hover{
    cursor: pointer;
}

input[type='checkbox'].switch::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height:1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0, 0, 2px, #999;
    top: 2px;
    position: absolute;
    left: 2px;
}

input[type='checkbox'].switch:checked {
    background: rgb(0, 160, 172);
}

input[type='checkbox'].switch:checked::after {
    left: 50%;
}

/* 动画类 */
input[type='checkbox'].switch.animated,
input[type='checkbox'].switch.animated::after {
    transition: all 0.3s;
}

.disable{
    opacity: 0.5;
    pointer-events: none;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.dialog-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    text-align: center;
    border-radius: 8px;
    width: 220px;
}

.hidden {
    display: none;
}

.dialog-content {
    text-align: center;
}

.dialog-content p {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.dialog-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 12px -16px;
}

.dialog-button {
    border: none;
    background-color: transparent;
    color: #2196F3;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    text-align: center;
}

.dialog-buttons {
    display: flex;
    flex-direction: column;
}