.jizo-input-with-ai {
    position: relative;
}

.jizo-input-preview {
    cursor: pointer;
    text-transform: none !important;
    word-break: break-word;
}

.jizo-input-with-ai[data-editing="0"] .jizo-input-editor {
    display: none;
}

.jizo-input-with-ai[data-editing="1"] .jizo-input-preview {
    opacity: 0;
    pointer-events: none;
}

.jizo-input-with-ai[data-editing="1"] .jizo-input-editor {
    display: flex;
}

.jizo-input-editor {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1525px;
    width: 100%;
}

.jizo-input-editor .btn-icon_:focus,
.jizo-input-editor .btn-icon_:focus-within,
.jizo-input-editor .btn-icon_:hover:active {
    all: unset;
}

.action-btns-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.jizo-input-ai-check {
    height: 60px;
    width: 72px;
    padding: 12px;
    border-radius: 6px;
    background: linear-gradient(45deg, #4D9500 0%, #7CD021 81.91%), linear-gradient(45deg, #F55420 0%, #FF8C1A 81.91%), linear-gradient(180deg, #FF7C47 0%, #FC1D5A 100%);
    border: none !important;
    &:hover {
        filter: brightness(120%)   
    }
}

.jizo-input-ai-cancel {
    height: 60px;
    width: 72px;
    padding: 12px;
    border-radius: 6px;
    background: linear-gradient(180deg, #FF7C47 0%, #FC1D5A 100%);    border: none !important;
    &:hover {
        filter: brightness(120%)   
    }
}

@media screen and (max-width: 481px) {
    .jizo-input-editor {
        left: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        flex-direction: column;
        padding: 0 20px;
        align-items: baseline;
        margin-top: 0px;
        gap: 8px;
    }
    .action-btns-container {
        width: 100%;
        justify-content: space-between;
        flex-direction: row-reverse;
    }
    .jizo-input-ai-generate,
    .jizo-input-ai-cancel { 
        height: 48px !important;
    }
    .jizo-input-ai-check,
    .jizo-input-ai-cancel {
        width: 48px;
        height: 48px;
    }
}

.jizo-input-field {
    height: auto;
    min-height: 65px;
    max-height: 65px;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px 12px 20px;
    width: 100%;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
    font-family: Inter;
    font-size: 24px;
    font-style: normal;
    font-weight: 800;
    line-height: 24px; /* 100% */
    text-transform: uppercase;
    position: relative;
    width: 355px;
    max-width: 100%;
    min-width: 0;
    flex: 0 1 auto;
    transition: width 0.2s ease;
    
    &:placeholder {
        color: var(--7A8E96, #7A8E96);
        font-family: Inter;
        font-size: 20px !important;
        font-style: normal;
        font-weight: 500;
        line-height: 24px; /* 120% */
    }
    /* &:hover {
        border: 1px solid var(--Blue, #0095FF);
        box-shadow: 0 0 8px 0 var(--Blue, #0095FF);
    } */
}

.jizo-input-ai-arrow {
    aspect-ratio: 1;
    border-radius: 50%;
    display: none;
}

.jizo-input-field input::placeholder,
.jizo-input-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.jizo-input-field input,
.jizo-input-field textarea {
    box-sizing: border-box;
    flex: 1 1 auto;
    display: block;
    border: none;
    background: transparent;
    color: var(--White, #FFF);
    font-family: Inter;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    /* text-transform: capitalize; */
    width: 100%;
    min-width: 0;
    height: 26px;
    min-height: 26px;
    max-height: 26px;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    white-space: pre;
    outline: 0;
    /* resize: none; */
    /* max-width: 960px; */
}

.jizo-input-field input[data-global-speech-recognition="input"],
.jizo-input-field textarea[data-global-speech-recognition="input"] {
    clip-path: inset(0 56px 0 0);
}

/* .jizo-input-field:has(input:focus),
.jizo-input-field:has(textarea:focus) {
    border: 1px solid var(--Blue, #0095FF);
    box-shadow: 0 0 8px 0 var(--Blue, #0095FF);
} */

.jizo-input-field textarea::-webkit-resizer {
    display: none;
}

.jizo-input-ai-check > [class*="icon-"] {
    margin-left: 0;
    margin-right: 0;
}

/* Generate with AI and Cancel buttons */
.jizo-input-ai-generate {
    height: 60px;
    border: none;
    padding: 0 16px;
    color: #FFF;
    text-align: center;
    border-radius: 8px;
    font-family: Helvetica;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px; /* 200% */
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
     &:hover {
        filter: brightness(120%)   
    }
}
/* .jizo-input-ai-cancel {
    max-width: 112px;
    width: 100%;
    min-width: 100%;
} */

.jizo-input-ai-generate {
    background: linear-gradient(45deg, #F55420 0%, #FF8C1A 81.91%);
    white-space: nowrap;
}


/* Loader inside Generate button */
.jizo-input-ai-generate .btn-loader {
    display: none;
}

.jizo-input-ai-generate .btn-icon_ {
    display: inline-flex;
    align-items: center;
    &:hover {
        all: unset;
    }
}

.jizo-input-ai-generate.is-loading .btn-loader {
    display: inline-block;
}

.jizo-input-ai-generate.is-loading .btn-icon_ {
    display: none;
}

.jizo-input-ai-generate.is-loading .btn-label {
    opacity: 0.7;
}

.jizo-input-suggestions-list {
    display: none;
    padding: 8px;
}

.jizo-input-suggestions-list.is-visible {
    display: block;
}

.jizo-input-suggestions-list li {
    padding: 4px 0;
}

.jizo-input-suggestions-list li a {
    border-radius: 8px;
    color: var(--White, #FFF);
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px; /* 150% */

    text-transform: none;

    display: flex;
    padding: 12px;
    justify-content: space-between;
    align-self: stretch;
    flex-direction: column;
    align-items: flex-start;

    text-decoration: none;
}

.input-field-container {
    display: flex; 
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    position: relative;
}

.jizo-input-char-count {
    position: absolute;
    right: 0px;
    top: -28px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px;
    color: var(--7A8E96, #7A8E96);
}

.jizo-input-char-count-number {
    color: var(--7A8E96, #7A8E96);
    font-variant: tabular-nums;
    transition: color 0.15s ease;
}

.jizo-input-char-count-number.is-filled {
    color: #FFF;
}

.jizo-input-char-count-number.is-max {
    color: var(--Orange, #FC6433);
}

.jizo-input-char-count-label {
    color: var(--7A8E96, #7A8E96);
}

.jizo-input-suggestions-list li a .jizo-input-suggestion-item-value {
    text-overflow: ellipsis;
    width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
}

.jizo-input-suggestions-list li a span[data-type] {
    color: var(--7A8E96, #7A8E96);
    font-family: Inter;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.jizo-input-suggestions-list li:hover a {
    background: var(--Dark-2, #1A3947);
}

@media (max-width: 481px) {
    .jizo-input-field {
        font-size: 14px !important;
        min-height: 48px;
        width: 100%;
    }
    .input-field-container {
        flex-direction: column;
        gap: 8px;
        align-items: baseline;
        width: 100%;
    }

    .jizo-input-char-count {
        top: -28px;
        right: 8px;
    }
}

.group-title .jizo-input-with-ai[data-editing="1"] ~ .draft-state-icon {
  display: none !important;
}

.view-header:has(.group-title .jizo-input-with-ai[data-editing="1"]) 
  .group-edit-title-buttons {
    pointer-events: none;
    opacity: 0.6;
}

.view-header {
    position: relative;
}

.view-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: 
      linear-gradient(0deg, rgba(5, 35, 48, 0.85) 0%, rgba(5, 35, 48, 0.7) 100%),
      linear-gradient(180deg, rgba(5, 35, 48, 0.40) 0%, rgba(5, 35, 48, 0.00) 100%);
    backdrop-filter: blur(5px);
}

.view-header-overlay.is-visible {
    opacity: 1;
}
