/* Whiteboard fills the viewport under the site header. The footer stays outside the fullscreen board. */

body.wb-body {
    overflow: hidden;
    background: #fff;
}

body.wb-body .grid {
    height: 100vh;
    min-height: 100vh;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

body.wb-body main.mainCenter {
    grid-area: main;
    display: flex;
    flex-direction: column;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    min-height: 0 !important;
    border: none;
    overflow: auto;
    background: #fff;
}

.wb-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0 !important;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wb {
    position: relative;
    isolation: isolate;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.wb:fullscreen,
.wb:-webkit-full-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
}

.wb-toolbar {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 16px;
    background: #fff;
    border-top: 3px solid #1875d0;
    border-bottom: 1px solid #e2e6ea;
    position: relative;
    z-index: 4;
    user-select: none;
}

.wb-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wb-sep {
    width: 1px;
    align-self: stretch;
    min-height: 24px;
    margin: 2px 2px;
    background: #e2e6ea;
}

.wb button.wb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid #d5dbe3;
    border-radius: 6px;
    background: #fff;
    color: #243140;
    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
}

.wb button.wb-btn svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

.wb button.wb-btn svg[hidden] {
    display: none !important;
}

.wb button.wb-btn:hover {
    background: #e8f1fb;
    color: #243140;
}

.wb button.wb-btn[aria-pressed="true"],
.wb button.wb-btn[aria-pressed="true"]:hover {
    background: #1875d0;
    border-color: #135ba2;
    color: #fff;
}

.wb button.wb-btn:disabled,
.wb button.wb-btn:disabled:hover {
    background: #f3f5f7;
    border-color: #e4e8ee;
    color: #b0b8c2;
    cursor: default;
}

.wb button.wb-btn:focus-visible,
.wb button.wb-swatch:focus-visible,
.wb-bg:focus-visible,
.wb-confirm button:focus-visible {
    outline: 2px solid #1875d0;
    outline-offset: 2px;
}

.wb button.wb-swatch {
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.28);
    background: var(--swatch);
    box-shadow: none;
    cursor: pointer;
}

.wb button.wb-swatch:hover {
    background: var(--swatch);
    color: inherit;
}

.wb button.wb-swatch[aria-pressed="true"] {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1875d0;
}

.wb [data-tip] {
    position: relative;
}

.wb [data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 4px 7px;
    border-radius: 4px;
    background: #243140;
    color: #fff;
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 8;
}

.wb [data-tip]:hover::after {
    opacity: 1;
}

.wb [data-tip].wb-tip-off::after,
.wb [data-tip].wb-tip-off:hover::after {
    opacity: 0;
}

.wb button:focus {
    outline: none;
}

.wb-bg {
    height: 34px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #d5dbe3;
    border-radius: 6px;
    background: #fff;
    color: #243140;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    cursor: pointer;
}

.wb-confirm {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px 2px 10px;
    border: 1px solid #f08c00;
    border-radius: 6px;
    background: #fff6e8;
    color: #243140;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.wb-confirm[hidden],
.wb button[hidden],
.wb-help[hidden],
.wb-toast[hidden] {
    display: none !important;
}

.wb .wb-confirm button {
    height: 28px;
    margin: 0;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #1875d0;
    background: #fff;
    color: #0a345c;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.wb .wb-confirm button:hover {
    background: #e8f1fb;
    color: #0a345c;
}

.wb #wb-confirm-yes {
    background: #e03131;
    border-color: #c22727;
    color: #fff;
}

.wb #wb-confirm-yes:hover {
    background: #c22727;
    color: #fff;
}

.wb-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 280px;
    background: #fff;
    touch-action: none;
    overflow: hidden;
    cursor: crosshair;
    z-index: 1;
}

.wb-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    cursor: inherit;
}

.wb-stage[data-tool="text"] {
    cursor: text;
}

.wb-stage[data-tool="text"][data-hover="text"],
.wb-stage[data-moving="1"] {
    cursor: move;
}

.wb-stage[data-tool="eraser"][data-size="small"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='6' fill='white' stroke='%23243140' stroke-width='1.5'/%3E%3Cpath d='M7 10h6' stroke='%23e03131' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 10 10, cell;
}

.wb-stage[data-tool="eraser"],
.wb-stage[data-tool="eraser"][data-size="medium"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='14' cy='14' r='10' fill='white' stroke='%23243140' stroke-width='2'/%3E%3Cpath d='M8 14h12' stroke='%23e03131' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, cell;
}

.wb-stage[data-tool="eraser"][data-size="large"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='16' fill='white' stroke='%23243140' stroke-width='2'/%3E%3Cpath d='M12 20h16' stroke='%23e03131' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 20 20, cell;
}

.wb-text-input {
    position: absolute;
    z-index: 3;
    margin: 0;
    padding: 0;
    border: none;
    outline: 2px dashed #1875d0;
    outline-offset: 1px;
    background: rgba(255, 255, 255, 0.92);
    font-family: "Open Sans", sans-serif;
    line-height: 1.25;
    box-shadow: none;
    border-radius: 0;
}

.wb-help {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px;
    background: rgba(20, 32, 48, 0.28);
}

.wb-help-card {
    width: min(420px, 100%);
    padding: 16px 18px 14px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(20, 32, 48, 0.22);
    color: #243140;
    font-size: 15px;
    line-height: 1.35;
}

.wb-help-card h2 {
    margin: 0 0 12px;
    padding: 0;
    font-size: 18px;
    letter-spacing: 0;
    color: #243140;
}

.wb-help-card dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 16px;
    margin: 0;
}

.wb-help-card dt {
    margin: 0;
    font-weight: 400;
    white-space: nowrap;
}

.wb-help-card dd {
    margin: 0;
    color: #1875d0;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.wb-help-card .wb-help-note {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: #526070;
}

.wb .wb-help-card button {
    margin: 14px 0 0;
    height: 34px;
    padding: 0 14px;
    font-size: 15px;
}

.wb-toast {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 7;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 999px;
    background: #243140;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
}

@media (max-width: 720px) {
    .wb [data-tip]::after {
        display: none;
    }
}
