:root {
    --polypad-chip-color: #E3F2FD;
    --polypad-highlight-color: rgba(227, 242, 253, 0.85);
    --polypad-highlight-border: rgba(25, 118, 210, 0.28);
    --polypad-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.08);
    --polypad-summary-chip-color: #0B57D0;
}


.polypad-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.polypad-display {
    margin-top: 8px;
}

.polypad-eq {
    display: inline-flex;
    align-items: center;
}

.polypad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--polypad-chip-color);
    border: 1px solid rgba(25, 118, 210, 0.18);
    box-shadow: var(--polypad-shadow);
    cursor: pointer;
    vertical-align: middle;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.polypad-btn:hover,
.polypad-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.02);
    outline: none;
}

.polypad-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.polypad-inline-highlight {
    background: var(--polypad-highlight-color);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px var(--polypad-highlight-border);
    padding: 0 3px;
}

.polypad-inline-chip {
    margin-left: 6px;
}

.polypad-line-end-chip {
    position: relative;
    top: -1px;
}

.polypad-reply-summary {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    clear: both;
    margin-top: 12px;
    margin-right: auto;
}

.polypad-summary-chip {
    background: var(--polypad-summary-chip-color);
    border-color: rgba(255, 255, 255, 0.22);
}

.polypad-summary-chip:hover,
.polypad-summary-chip:focus-visible {
    filter: brightness(1.08);
}

.chatoame-polypad-summary-panel {
    margin-top: 1rem;
    border: 1px solid rgba(45, 93, 168, 0.18);
    border-radius: 16px;
    padding: 0.75rem 1rem 1rem;
    background: #f6f8fc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    order: 100;
    align-self: stretch;
}

.chatoame-polypad-summary-panel summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.chatoame-polypad-summary-panel summary::-webkit-details-marker {
    display: none;
}

.chatoame-polypad-summary-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.chatoame-polypad-summary-heading .polypad-summary-chip {
    flex: 0 0 auto;
}

.chatoame-polypad-summary-body {
    margin-top: 0.875rem;
}

.chatoame-polypad-summary-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.chatoame-polypad-summary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(45, 93, 168, 0.2);
    background: #fff;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--polypad-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.chatoame-polypad-summary-action:hover,
.chatoame-polypad-summary-action:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.01);
    outline: none;
}

.chatoame-polypad-summary-frame-wrap {
    background: #fff;
    border: 1px solid rgba(45, 93, 168, 0.12);
    border-radius: 14px;
    overflow: hidden;
    min-height: 680px;
}

.chatoame-polypad-summary-frame {
    display: block;
    width: 100%;
    min-height: 680px;
    border: 0;
    background: #fff;
}

.mwai-reply.mwai-ai > .chatoame-polypad-summary-panel,
.mwai-ai-message > .chatoame-polypad-summary-panel,
.mwai-assistant > .chatoame-polypad-summary-panel,
.mwai-message.mwai-ai > .chatoame-polypad-summary-panel,
.mwai-message[data-role="assistant"] > .chatoame-polypad-summary-panel,
.mwai-answer > .chatoame-polypad-summary-panel {
    display: block;
}


.polypad-balance-chip {
    background: #E8F5E9;
    border-color: rgba(46, 125, 50, 0.18);
}

.chatoame-polypad-summary-panel {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none;
    min-width: 0;
}

.chatoame-polypad-summary-body,
.chatoame-polypad-summary-frame-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chatoame-polypad-summary-frame-wrap {
    min-height: 760px;
}

.chatoame-polypad-summary-frame {
    width: 100% !important;
    min-height: 760px;
    height: min(82vh, 980px);
}


.chatoame-polypad-summary-frame-wrap.is-fullscreen,
.chatoame-polypad-summary-frame-wrap:fullscreen {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    border-radius: 0;
    margin: 0;
    background: #fff;
}

.chatoame-polypad-summary-frame-wrap.is-fullscreen .chatoame-polypad-summary-frame,
.chatoame-polypad-summary-frame-wrap:fullscreen .chatoame-polypad-summary-frame {
    width: 100vw !important;
    min-height: 100dvh;
    height: 100dvh;
}

polypad,
.polypad-structured-marker {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
