/* chat-style.css */
/* Scoped chat shell styles only apply inside layout-with-chat so we do not mutate the rest of AdminLTE. */

.layout-with-chat-shell {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 20px;
    min-height: 0;
}

.layout-with-chat-shell > .page-main {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    transition: flex-basis .25s ease, max-width .25s ease, width .25s ease;
}

.layout-with-chat-shell > .chat-box {
    position: relative;
    flex: 0 0 min(420px, 34vw);
    width: min(420px, 34vw);
    min-width: 320px;
    max-width: 420px;
    transition: transform .25s ease, opacity .25s ease, width .25s ease, flex-basis .25s ease, margin .25s ease;
}

.layout-with-chat-shell.chat-collapsed > .chat-box {
    opacity: 0;
    pointer-events: none;
    transform: translateX(28px);
    flex-basis: 0;
    width: 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
}

.layout-with-chat-shell--standalone {
    display: block;
}

.layout-with-chat-shell--standalone > .chat-box {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.layout-with-chat-shell--standalone .chat-panel {
    height: calc(100vh - 160px);
    min-height: 640px;
}

.layout-with-chat-shell .chat-reopen-btn {
    position: fixed;
    right: 16px;
    top: 50%;
    z-index: 1040;
    transform: translate3d(12px, -50%, 0);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
}

.layout-with-chat-shell.chat-collapsed .chat-reopen-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, -50%, 0);
}

.layout-with-chat-shell .chat-panel {
    display: flex;
    flex-direction: column;
    height: 83vh;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(247,250,255,0.96) 100%);
}

.layout-with-chat-shell .chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e7edf5;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(245,248,255,0.94) 100%);
}

.layout-with-chat-shell .chat-panel-heading {
    min-width: 0;
}

.layout-with-chat-shell .chat-panel-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}

.layout-with-chat-shell .chat-panel-status {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
}

.layout-with-chat-shell .chat-panel-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}

.layout-with-chat-shell .chat-panel-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.layout-with-chat-shell .chat-ui {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}

.layout-with-chat-shell .chat-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    font-family: "Segoe UI", "Inter", sans-serif;
    font-size: 14px;
}

.layout-with-chat-shell .chat-scroll-latest {
    position: absolute;
    right: 1.25rem;
    bottom: 8.5rem;
    z-index: 4;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    color: #1d4ed8;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    font-size: 0.78rem;
    font-weight: 600;
}

.layout-with-chat-shell .chat-scroll-latest[hidden] {
    display: none;
}

.layout-with-chat-shell .chat-container .message {
    padding: 10px 12px;
    margin: 5px;
    border-radius: 16px;
    max-width: 72%;
    position: relative;
    animation: fadeIn 0.5s ease-in-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.layout-with-chat-shell .chat-container .chat-plugin-message {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
}

.layout-with-chat-shell .chat-container .user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.layout-with-chat-shell .chat-container .assistant-message {
    align-self: flex-start;
    background: #eef4ff;
    color: #223049;
    border: 1px solid #dbe5ff;
}

.layout-with-chat-shell .chat-function-choice-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.layout-with-chat-shell .chat-function-choice {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    padding: 0.55rem 0.7rem;
    border: 1px solid #bfd3ff;
    border-radius: 10px;
    color: #1d4ed8;
    background: #ffffff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.layout-with-chat-shell .chat-function-choice:hover:not(:disabled),
.layout-with-chat-shell .chat-function-choice:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.layout-with-chat-shell .chat-function-choice.is-selected {
    border-color: #2563eb;
    color: #ffffff;
    background: #2563eb;
}

.layout-with-chat-shell .chat-function-choice:disabled:not(.is-selected) {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
    cursor: default;
}

.layout-with-chat-shell .chat-container .streaming-message.is-streaming {
    position: relative;
}

.layout-with-chat-shell .chat-container .streaming-pending-status {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    line-height: 1.25rem;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
}

.layout-with-chat-shell .chat-container .streaming-pending-status::after {
    display: inline-block;
    flex: 0 0 1.25rem;
    width: 1.25rem;
    margin-left: 0.15rem;
    content: "...";
    letter-spacing: 0.08rem;
    animation: streamPendingDots 1.2s ease-in-out infinite;
}

.layout-with-chat-shell .chat-container .streaming-cursor {
    display: inline-block;
    width: 0.55rem;
    height: 1.1rem;
    margin-left: 0.2rem;
    vertical-align: text-bottom;
    background-color: rgba(0, 0, 0, 0.55);
    animation: streamCursorBlink 1s steps(1, end) infinite;
}

.layout-with-chat-shell .chat-container .is-waiting-for-first-delta .streaming-cursor {
    display: none;
}

.layout-with-chat-shell .chat-container .stream-error-note {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.5rem;
    font-size: 12px;
    color: #b91c1c;
}

.layout-with-chat-shell .chat-container .stream-error-action {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: #ffffff;
    background: #1769e8;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(23, 105, 232, 0.18);
}

.layout-with-chat-shell .chat-container .stream-error-action:hover,
.layout-with-chat-shell .chat-container .stream-error-action:focus-visible {
    color: #ffffff;
    background: #0f55c7;
    text-decoration: none;
}

@keyframes streamPendingDots {
    0%,
    100% {
        opacity: 0.35;
    }

    50% {
        opacity: 1;
    }
}

.layout-with-chat-shell .chat-container .system-message {
    padding: 1rem;
    font-size: 11px;
    border: 1px solid #eeeeee;
    text-align: left;
    max-width: 72%;
    color: #64748b;
    background-color: rgba(255,255,255,0.72);
}

.layout-with-chat-shell .chat-container .system-message:before {
    content: 'system info';
    font-weight: bold;
    color: forestgreen;
}

.layout-with-chat-shell .chat-container .chat-markdown {
    line-height: 1.45;
    max-width: 100%;
}

.layout-with-chat-shell .chat-container .chat-markdown > :first-child {
    margin-top: 0;
}

.layout-with-chat-shell .chat-container .chat-markdown > :last-child {
    margin-bottom: 0;
}

.layout-with-chat-shell .chat-container .chat-markdown p {
    margin: 0 0 0.55rem;
}

.layout-with-chat-shell .chat-container .chat-markdown h1,
.layout-with-chat-shell .chat-container .chat-markdown h2,
.layout-with-chat-shell .chat-container .chat-markdown h3,
.layout-with-chat-shell .chat-container .chat-markdown h4,
.layout-with-chat-shell .chat-container .chat-markdown h5,
.layout-with-chat-shell .chat-container .chat-markdown h6 {
    margin: 0.65rem 0 0.35rem;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
}

.layout-with-chat-shell .chat-container .chat-markdown h1 {
    font-size: 1.18rem;
}

.layout-with-chat-shell .chat-container .chat-markdown h2 {
    font-size: 1.08rem;
}

.layout-with-chat-shell .chat-container .chat-markdown h3,
.layout-with-chat-shell .chat-container .chat-markdown h4,
.layout-with-chat-shell .chat-container .chat-markdown h5,
.layout-with-chat-shell .chat-container .chat-markdown h6 {
    font-size: 1rem;
}

.layout-with-chat-shell .chat-container .chat-markdown ul,
.layout-with-chat-shell .chat-container .chat-markdown ol {
    margin: 0.35rem 0 0.55rem;
    padding-left: 1.25rem;
}

.layout-with-chat-shell .chat-container .chat-markdown li {
    margin: 0.18rem 0;
}

.layout-with-chat-shell .chat-container .chat-markdown code {
    padding: 0.1rem 0.28rem;
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
    font-size: 0.88em;
    overflow-wrap: anywhere;
}

.layout-with-chat-shell .chat-container .chat-markdown pre {
    max-width: 100%;
    margin: 0.45rem 0 0.65rem;
    padding: 0.75rem;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: #0f172a;
    color: #e5edf7;
}

.layout-with-chat-shell .chat-container .chat-markdown pre code {
    display: block;
    padding: 0;
    background: transparent;
    color: inherit;
    white-space: pre;
    overflow-wrap: normal;
}

.layout-with-chat-shell .chat-container .chat-markdown blockquote {
    margin: 0.45rem 0 0.65rem;
    padding: 0.15rem 0 0.15rem 0.75rem;
    border-left: 3px solid rgba(59, 130, 246, 0.5);
    color: #475569;
}

.layout-with-chat-shell .chat-container .chat-markdown .chat-markdown-table-wrap {
    max-width: 100%;
    margin: 0.45rem 0 0.65rem;
    overflow-x: auto;
}

.layout-with-chat-shell .chat-container .chat-markdown table {
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}

.layout-with-chat-shell .chat-container .chat-markdown th,
.layout-with-chat-shell .chat-container .chat-markdown td {
    padding: 0.35rem 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    text-align: left;
    vertical-align: top;
}

.layout-with-chat-shell .chat-container .chat-markdown th {
    background: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

.layout-with-chat-shell .chat-container .chat-markdown a {
    color: #1d4ed8;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.layout-with-chat-shell .chat-container .chat-message-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.layout-with-chat-shell .chat-container .assistant-message .chat-message-actions,
.layout-with-chat-shell .chat-container .chat-plugin-message .chat-message-actions {
    justify-content: flex-start;
}

.layout-with-chat-shell .chat-container .chat-message-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    background: transparent;
    color: currentColor;
    font-size: 0.72rem;
    line-height: 1;
    padding: 0;
    opacity: 0.55;
    cursor: pointer;
}

.layout-with-chat-shell .chat-container .chat-message-delete-btn:hover,
.layout-with-chat-shell .chat-container .chat-message-delete-btn:focus {
    background: transparent;
    color: #dc2626;
    opacity: 0.95;
    outline: none;
}

.layout-with-chat-shell .chat-container .chat-message-delete-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.layout-with-chat-shell .chat-container .message img,
.layout-with-chat-shell .chat-container .message video,
.layout-with-chat-shell .chat-container .message audio {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

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

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

@keyframes streamCursorBlink {
    0%, 49% {
        opacity: 1;
    }

    50%, 100% {
        opacity: 0;
    }
}

body.layout-with-chat-body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.layout-with-chat-shell .chat-ui .chat-input-window {
    background: rgba(255,255,255,0.92);
    border-top: 1px solid #e7edf5;
    padding: 12px 15px 10px;
}

.layout-with-chat-shell .chat-ui .chat-input-window .input-wrapper textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #dbe3ef;
    background-color: #f8fbff;
    color: #1f2937;
    border-radius: 14px;
    padding: 12px 14px;
    resize: vertical;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.layout-with-chat-shell .chat-ui .chat-input-window .input-wrapper textarea:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    outline: none;
}

.layout-with-chat-shell .chat-ui .chat-input-window .options-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 12px;
}

.layout-with-chat-shell .chat-ui .chat-input-window .options-panel .form-check {
    padding-left: 2rem;
}

.layout-with-chat-shell .chat-wrapper .form-check {
    margin-top: 0.5rem;
}

.layout-with-chat-shell .options-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.layout-with-chat-shell .options-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.layout-with-chat-shell .chat-action-btn,
.layout-with-chat-shell .chat-send-btn,
.layout-with-chat-shell .action-buttons-wrapper .btn,
.layout-with-chat-shell .system-link .btn {
    border-radius: 12px;
}

.layout-with-chat-shell .chat-send-btn {
    min-width: 112px;
}

.layout-with-chat-shell .chat-submit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.layout-with-chat-shell .chat-stop-btn {
    min-width: 72px;
    color: #475569;
}

.layout-with-chat-shell .chat-send-btn:disabled,
.layout-with-chat-shell .chat-send-btn.is-busy {
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

.layout-with-chat-shell .chat-system-toggle {
    margin-bottom: 0;
    padding: 8px 10px 8px 2rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.layout-with-chat-shell .chat-container::-webkit-scrollbar {
    width: 8px;
}

.layout-with-chat-shell .chat-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.layout-with-chat-shell .chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.right {
    text-align: right;
    padding-right: 1rem;
}

.icon-button-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: #6c757d;
    color: white;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 8px;
}

.icon-button-circle:hover {
    background-color: #5a6268;
}

.layout-with-chat-shell .input-wrapper {
    display: flex;
    flex-direction: column;
}

.plugin-box {
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 1rem;
}

.plugin-header {
    padding: 1rem 0 0.5rem 0;
    color: grey;
    text-align: right;
    border-bottom: 1px solid #e7e7e7;
    margin-bottom: 1rem;
}

.layout-with-chat-shell .upload-button-wrapper {
    position: relative;
}

.upload-icon-button {
    font-size: 20px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 8px;
}

.layout-with-chat-shell .file-preview-panel {
    display: flex;
    gap: 10px;
    padding: 5px 0 5px 4px;
    flex-wrap: wrap;
}

.layout-with-chat-shell .file-preview-badge {
    background-color: #e6e6e6;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    color: #333;
}

.layout-with-chat-shell .file-preview-badge .remove-file {
    margin-left: 6px;
    font-weight: bold;
    color: #900;
    cursor: pointer;
}

.layout-with-chat-shell .message.sys_link {
    padding: 0;
}

/*Room card styles*/
.room-card {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.room-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.room-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.room-address {
    font-size: 0.9rem;
    color: #666;
}

.room-description {
    font-size: 0.95rem;
    color: #333;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
    .layout-with-chat-shell {
        display: block;
    }

    .layout-with-chat-shell > .page-main {
        width: 100%;
    }

    .layout-with-chat-shell > .chat-box {
        position: fixed;
        right: 10px;
        top: 92px;
        bottom: 16px;
        width: min(420px, calc(100vw - 20px));
        min-width: min(420px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
        z-index: 1035;
    }

    .layout-with-chat-shell .chat-panel {
        height: calc(100vh - 112px);
    }

    .layout-with-chat-shell.chat-collapsed > .chat-box {
        transform: translateX(calc(100% + 18px));
    }
}

@media (max-width: 768px) {
    .room-card {
        min-height: 380px;
    }
}

@media (max-width: 767.98px) {
    .layout-with-chat-shell .chat-reopen-btn {
        top: auto;
        bottom: 20px;
        right: 16px;
        transform: translate3d(12px, 0, 0);
    }

    .layout-with-chat-shell.chat-collapsed .chat-reopen-btn {
        transform: translate3d(0, 0, 0);
    }

    .layout-with-chat-shell .chat-panel-header {
        padding: 14px;
    }

    .layout-with-chat-shell .chat-panel-toggle span,
    .layout-with-chat-shell .chat-reopen-btn span {
        display: none;
    }

    .layout-with-chat-shell .chat-ui .chat-input-window {
        padding: 10px 12px 12px;
    }

    .layout-with-chat-shell .chat-ui .chat-input-window .options-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .layout-with-chat-shell .options-left {
        width: 100%;
    }

    .layout-with-chat-shell .chat-send-btn {
        width: 100%;
    }
}

.layout-with-chat-shell .chat-container .rms-object-action-menu {
    width: min(100%, 430px);
    overflow: hidden;
    border: 1px solid #dbe5f3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

.layout-with-chat-shell .chat-container .chat-plugin-message--object-action-menu {
    width: min(94%, 450px);
    max-width: min(94%, 450px);
}

.rms-object-action-menu__header {
    padding: 14px 15px 12px;
    border-bottom: 1px solid #e8eef7;
    background: linear-gradient(135deg, #f8fbff, #eef5ff);
}

.rms-object-action-menu__eyebrow {
    overflow: hidden;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rms-object-action-menu__title {
    margin: 0;
    color: #172033;
    font-size: 0.98rem;
    font-weight: 750;
    line-height: 1.35;
}

.rms-object-action-menu__description {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.4;
}

.rms-object-action-menu__list {
    display: grid;
    gap: 1px;
    background: #e8eef7;
}

.rms-object-action-menu__item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 62px;
    padding: 10px 12px;
    background: #fff;
}

.rms-object-action-menu__number {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    color: #1d4ed8;
    background: #eaf2ff;
    font-size: 0.75rem;
    font-weight: 800;
}

.rms-object-action-menu__copy {
    min-width: 0;
}

.rms-object-action-menu__item-title,
.rms-object-action-menu__item-description {
    overflow: hidden;
    text-overflow: ellipsis;
}

.rms-object-action-menu__item-title {
    margin: 0;
    color: #1e293b;
    font-size: 0.83rem;
    font-weight: 700;
    white-space: nowrap;
}

.rms-object-action-menu__item-description {
    display: -webkit-box;
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rms-object-action-menu__button {
    min-width: 54px;
    border: 1px solid #b9cdf7;
    border-radius: 999px;
    padding: 6px 10px;
    color: #1d4ed8;
    background: #f8fbff;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.rms-object-action-menu__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.rms-object-action-menu__link:hover,
.rms-object-action-menu__link:focus-visible {
    text-decoration: none;
}

.rms-object-action-menu__button:hover:not(:disabled) {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.rms-object-action-menu__button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.rms-object-action-menu__error {
    padding: 9px 12px;
    color: #b42318;
    background: #fff1f0;
    font-size: 0.75rem;
}

.calendar-plugin__header-actions {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.calendar-plugin__page-link {
    overflow: hidden;
    max-width: 150px;
    border: 1px solid #b9cdf7;
    border-radius: 999px;
    padding: 5px 9px;
    color: #175cd3;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-plugin__page-link:hover,
.calendar-plugin__page-link:focus-visible {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
    text-decoration: none;
}

.calendar-plugin {
    min-width: 0;
    overflow: hidden;
}

.calendar-plugin .plugin-header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
}

.calendar-plugin .calendar-content {
    min-width: 0;
}

.calendar-month-map {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dbe7f7;
    border-radius: 16px;
    padding: 10px;
    background:
        radial-gradient(circle at 92% 8%, rgba(37, 99, 235, 0.08), transparent 34%),
        linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}

.calendar-month-map__toolbar {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 6px;
}

.calendar-month-map__title {
    overflow: hidden;
    margin: 0;
    color: #172b4d;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-month-map__nav {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid #c7d8f3;
    border-radius: 10px;
    padding: 0;
    color: #175cd3;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.calendar-month-map__nav:hover:not(:disabled),
.calendar-month-map__nav:focus-visible {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
    transform: translateY(-1px);
}

.calendar-month-map__nav:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.calendar-month-map__nav:disabled {
    cursor: wait;
    opacity: 0.52;
}

.calendar-month-map__occupancy {
    position: relative;
    min-height: 50px;
    margin-top: 8px;
    border-radius: 12px;
    padding: 4px 3px;
    background: rgba(255, 255, 255, 0.62);
}

.calendar-month-map__grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(var(--calendar-week-count), minmax(22px, calc(12px + var(--calendar-lane-count) * 8px)));
}

.calendar-month-map__day {
    position: relative;
    min-width: 0;
}

.calendar-month-map__availability-dot {
    position: absolute;
    z-index: 0;
    top: 8px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c4cedc;
    box-shadow: 0 1px 2px rgba(71, 85, 105, 0.12);
    transform: translateX(-50%);
}

.calendar-month-map__segment {
    --calendar-event-color: #2563eb;
    --calendar-event-lane: 0;
    position: absolute;
    z-index: 1;
    top: calc(7px + var(--calendar-event-lane) * 8px);
    right: 0;
    left: 0;
    height: 7px;
    pointer-events: none;
}

.calendar-month-map__segment::before,
.calendar-month-map__segment::after {
    position: absolute;
    top: 2px;
    height: 3px;
    background: var(--calendar-event-color);
    content: '';
}

.calendar-month-map__segment.continues-before::before {
    right: 50%;
    left: 0;
}

.calendar-month-map__segment.continues-after::after {
    right: 0;
    left: 50%;
}

.calendar-month-map__dot {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    width: 7px;
    height: 7px;
    border: 1.5px solid #fff;
    border-radius: 50%;
    background: var(--calendar-event-color);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--calendar-event-color) 38%, transparent);
    transform: translateX(-50%);
}

.calendar-month-map__loading {
    position: absolute;
    inset: 0;
    display: flex;
    margin: 0;
    align-items: center;
    justify-content: center;
    color: #73829a;
    font-size: 0.72rem;
    text-align: center;
    background: rgba(248, 251, 255, 0.72);
}

@media (prefers-reduced-motion: reduce) {
    .calendar-month-map__nav {
        transition: none;
    }
}

@media (max-width: 420px) {
    .rms-object-action-menu__item {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .rms-object-action-menu__button {
        grid-column: 2;
        justify-self: start;
    }
}
