.tigersoft-copilot-launcher {
    position: fixed;
    right: 1.5rem;
    bottom: 6rem;
    z-index: 1045;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #0f6cbd 0%, #6250c8 52%, #a426a8 100%);
    box-shadow: 0 0.4rem 1.1rem rgb(31 35 48 / 28%);
    font: inherit;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.tigersoft-copilot-launcher .ti {
    font-size: 1.25rem;
}

.tigersoft-copilot-launcher:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 0.55rem 1.35rem rgb(31 35 48 / 34%);
}

.tigersoft-copilot-launcher:focus-visible {
    outline: 3px solid rgb(15 108 189 / 35%);
    outline-offset: 3px;
}

.tigersoft-copilot-helper-toggle {
    position: fixed;
    right: 8.6rem;
    bottom: 6rem;
    z-index: 1046;
    display: none;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(98 80 200 / 35%);
    border-radius: 999px;
    color: #6250c8;
    background: var(--tblr-bg-surface, #fff);
    box-shadow: 0 0.35rem 1rem rgb(31 35 48 / 20%);
    cursor: pointer;
}

.tigersoft-copilot-helper-toggle:hover,
.tigersoft-copilot-helper-toggle:focus-visible {
    color: #0f6cbd;
    border-color: #0f6cbd;
}

.tigersoft-copilot-helper-panel {
    position: fixed;
    right: 1.5rem;
    bottom: 9.75rem;
    z-index: 1055;
    width: 22rem;
    max-width: calc(100vw - 3rem);
    padding: 1rem;
    border: 1px solid var(--tblr-border-color, #d9dde3);
    border-radius: 0.75rem;
    color: var(--tblr-body-color, #1f2937);
    background: var(--tblr-bg-surface, #fff);
    box-shadow: 0 0.75rem 2.5rem rgb(31 35 48 / 24%);
}

.tigersoft-copilot-helper-panel[hidden],
.tigersoft-copilot-preview[hidden] {
    display: none !important;
}

.tigersoft-copilot-helper-heading,
.tigersoft-copilot-preview-header,
.tigersoft-copilot-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tigersoft-copilot-helper-heading {
    font-weight: 700;
}

.tigersoft-copilot-helper-heading > button,
.tigersoft-copilot-preview-header > button {
    padding: 0.25rem;
    border: 0;
    color: inherit;
    background: transparent;
}

.tigersoft-copilot-helper-panel > p {
    margin: 0.45rem 0 0.8rem;
    color: var(--tblr-secondary-color, #667085);
    font-size: 0.825rem;
}

.tigersoft-copilot-helper-actions {
    display: grid;
    gap: 0.45rem;
}

.tigersoft-copilot-helper-actions button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--tblr-border-color, #d9dde3);
    border-radius: 0.5rem;
    color: inherit;
    background: var(--tblr-bg-surface-secondary, #f7f8fa);
    text-align: left;
}

.tigersoft-copilot-helper-actions button:hover {
    border-color: #6250c8;
    background: rgb(98 80 200 / 7%);
}

.tigersoft-copilot-private-option {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.8rem;
}

.tigersoft-copilot-helper-status {
    min-height: 1.2rem;
    margin-top: 0.5rem;
    color: var(--tblr-danger, #d63939);
    font-size: 0.8rem;
}

.tigersoft-copilot-preview {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgb(17 24 39 / 55%);
}

.tigersoft-copilot-preview-card {
    display: flex;
    flex-direction: column;
    width: min(56rem, 100%);
    max-height: calc(100vh - 4rem);
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--tblr-bg-surface, #fff);
    box-shadow: 0 1rem 4rem rgb(0 0 0 / 35%);
}

.tigersoft-copilot-preview-header small {
    display: block;
    margin-top: 0.15rem;
    color: var(--tblr-secondary-color, #667085);
}

.tigersoft-copilot-preview textarea {
    min-height: 24rem;
    margin: 1rem 0;
    padding: 0.8rem;
    border: 1px solid var(--tblr-border-color, #d9dde3);
    border-radius: 0.5rem;
    resize: vertical;
    color: var(--tblr-body-color, #1f2937);
    background: var(--tblr-bg-surface-secondary, #f7f8fa);
    font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tigersoft-copilot-preview-footer > span {
    color: var(--tblr-secondary-color, #667085);
    font-size: 0.8rem;
}

.tigersoft-copilot-preview-footer > div {
    display: flex;
    gap: 0.5rem;
}

.tigersoft-copilot-toast {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 2100;
    max-width: 28rem;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    color: #fff;
    background: #198754;
    box-shadow: 0 0.5rem 1.5rem rgb(31 35 48 / 25%);
}

.tigersoft-copilot-toast.is-error {
    background: #d63939;
}

@media (min-width: 1400px) {
    .tigersoft-copilot-launcher,
    .tigersoft-copilot-helper-toggle.is-available {
        display: inline-flex;
    }
}

@media print {
    .tigersoft-copilot-launcher,
    .tigersoft-copilot-helper-toggle,
    .tigersoft-copilot-helper-panel,
    .tigersoft-copilot-preview,
    .tigersoft-copilot-toast {
        display: none !important;
    }
}
