/*--------------------------------------------------------------
# Whiteboard
--------------------------------------------------------------*/

#whiteboard {
    z-index: 11;
    position: fixed;
    margin: auto;
    padding: 10px;
    width: var(--wb-width);
    height: var(--wb-height);
    max-width: 90vw;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    /* center */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* fade in */
    -webkit-animation: fadeIn ease-in 1;
    -moz-animation: fadeIn ease-in 1;
    animation: fadeIn ease-in 1;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    -webkit-animation-duration: 1s;
    -moz-animation-duration: 1s;
    animation-duration: 1s;
    overflow: hidden;
}

.whiteboard-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    cursor: move;
    position: relative;
}

.whiteboard-header-options {
    display: flex;
    align-items: center;
}

.whiteboard-header-title {
    display: flex;
    align-items: center;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

#whiteboardUnlockBtn,
#whiteboardLockBtn {
    display: none;
    margin-left: 3px;
    margin-right: 3px;
}

.whiteboard-header-title button,
.whiteboard-header-options button {
    padding: 10px;
    font-size: 1rem;
    background: transparent;
    color: #fff;
    border: none !important;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    transition: background 0.23s;
}

.whiteboard-header-title button:hover,
.whiteboard-header-options button:hover {
    background: rgba(255, 255, 255, 0.15);
}

#whiteboardPencilBtn {
    color: #ffffff !important;
}

.whiteboardColorPicker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0;
    width: 20px;
    height: 15px;
    margin: 2px;
    border-radius: 20px;
    border: solid 0.5px #afadad38;
    cursor: pointer;
}
.whiteboardColorPicker:hover {
    transform: var(--btns-hover-scale);
    transition: all 0.3s ease-in-out;
}
.whiteboardColorPicker::-webkit-color-swatch {
    border: none;
    border-radius: 20px;
    padding: 0;
}
.whiteboardColorPicker::-webkit-color-swatch-wrapper {
    border: none;
    border-radius: 20px;
    padding: 0;
}
.whiteboardColorPicker::-moz-color-swatch {
    border: none;
    border-radius: 20px;
    padding: 0;
}
.whiteboardColorPicker::-moz-color-swatch-wrapper {
    border: none;
    border-radius: 20px;
    padding: 0;
}
.whiteboardColorPicker::color-swatch {
    border: none;
    border-radius: 20px;
    padding: 0;
}
.whiteboardColorPicker::color-swatch-wrapper {
    border: none;
    border-radius: 20px;
    padding: 0;
}

/* White canvas area */
#whiteboard .canvas-container {
    background: var(--wb-bg);
    border-radius: 10px;
    overflow: hidden;
    max-height: calc(85vh - 70px);
    max-width: calc(90vw - 20px);
}

.hidden {
    display: none;
}

.show {
    display: block;
}

/* Styles for the dropdown button */
.whiteboard-dropdown {
    margin-left: 5px;
    float: right;
    position: relative;
}

/* Styles for the dropdown menu container */
.whiteboard-dropdown-menu {
    z-index: 12;
    position: absolute;
    margin-top: 5px;
    top: 100%;
    right: 0;
    display: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(var(--wb-height) * 1px) !important;
}

/* Styles for dropdown menu items */
.whiteboard-dropdown-menu button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 160px;
    font-size: 0.8em;
    text-align: left;
    padding: 10px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.whiteboard-dropdown-menu button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff;
}

/* Styles for icons and SVGs inside buttons */
.whiteboard-dropdown-menu button i,
.whiteboard-dropdown-menu button svg {
    margin-right: 8px;
}

/* Styles for list items */
.whiteboard-dropdown-menu li {
    padding: 8px 16px;
}

.whiteboard-dropdown-menu li:hover {
    background: var(--body-bg);
}

/* Ensuring dropdown buttons within list items have transparent background */
.whiteboard-dropdown-menu li button {
    background: transparent;
    padding: 0;
}
