Files
mirotalk/public/css/whiteboard.css
T
2025-12-04 00:22:40 +01:00

418 lines
8.7 KiB
CSS

/*--------------------------------------------------------------
# Whiteboard
--------------------------------------------------------------*/
#whiteboard {
z-index: 11;
position: fixed;
margin: auto;
padding: 10px;
max-width: 100vw;
max-height: 100vh;
width: var(--wb-width);
height: var(--wb-height);
background: var(--wb-bg);
border: var(--border);
box-shadow: var(--box-shadow);
border-radius: 10px;
/* 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: visible;
box-sizing: border-box;
}
/* Mobile optimizations */
@media (max-width: 768px) {
#whiteboard {
padding: 5px;
border-radius: 5px;
}
.whiteboard-header {
padding: 2px;
}
.whiteboard-header-title button,
.whiteboard-header-options button {
padding: 5px;
font-size: 0.75rem;
min-width: 28px;
height: 28px;
}
.whiteboardColorPicker {
width: 16px;
height: 12px;
margin: 1px;
}
}
.whiteboard-header {
display: flex;
justify-content: space-between;
padding: 5px;
border-radius: 10px;
background: rgba(0, 0, 0, 0.2);
color: #ffffff;
cursor: move;
}
.whiteboard-header-title {
display: flex;
align-items: center;
}
.whiteboard-header-options {
display: flex;
align-items: center;
}
#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: var(--body-bg);
}
.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;
}
.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: 5px;
background: var(--body-bg);
border: none;
overflow-y: auto;
overflow-x: hidden;
max-height: var(--wb-height) !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;
cursor: pointer;
}
.whiteboard-dropdown-menu button:hover {
background: var(--select-bg) !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;
}
/* Whiteboard Shortcuts Styles */
#whiteboardShortcutsContent {
display: none;
}
.wb-shortcuts-container {
text-align: left;
font-family: 'Segoe UI', Arial, sans-serif;
background: var(--body-bg);
padding: 1.5rem;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
max-width: 600px;
margin: 0 auto;
}
.wb-shortcuts-title {
margin-top: 1.5rem;
margin-bottom: 0.8rem;
font-size: 1.3rem;
font-weight: 700;
color: #ffd700;
display: flex;
align-items: center;
gap: 0.6rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}
.wb-shortcuts-title:first-child {
margin-top: 0;
}
.wb-shortcuts-title i {
color: #ffa500;
font-size: 1.2rem;
}
.wb-shortcuts-code {
background: var(--body-bg);
padding: 1rem 1rem;
border-radius: 8px;
white-space: pre;
overflow-x: auto;
font-family: 'Courier New', monospace;
font-size: 0.95rem;
line-height: 1.8;
color: var(--text-color);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
filter: brightness(0.85);
}
.wb-shortcuts-text {
color: #66beff;
font-weight: 700;
font-size: 1.1rem;
letter-spacing: 0.03em;
background: linear-gradient(135deg, rgba(102, 190, 255, 0.15), rgba(102, 190, 255, 0.08));
padding: 8px 16px;
border-radius: 8px;
display: inline-block;
box-shadow: 0 2px 8px rgba(102, 190, 255, 0.1);
}
.wb-shortcuts-list {
list-style: none;
padding-left: 0;
background: var(--body-bg);
border-radius: 8px;
padding: 0.8rem;
filter: brightness(0.9);
}
.wb-shortcuts-list li {
margin: 0.6rem 0;
padding: 0.5rem 0.8rem;
background: rgba(255, 255, 255, 0.05);
border-radius: 6px;
color: var(--text-color);
font-weight: 500;
font-size: 1rem;
transition: all 0.2s ease;
}
.wb-shortcuts-list li:hover {
background: rgba(255, 215, 0, 0.15);
border-left: 3px solid #ffd700;
}
/* Sticky Note Dialog Styles */
.sticky-note-form {
display: flex;
background: var(--body-bg);
flex-direction: column;
gap: 1.2rem;
padding: 1.2rem;
border-radius: 12px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
border: 1px solid rgba(255, 215, 0, 0.18);
max-width: 100%;
box-sizing: border-box;
}
.sticky-note-colors-row {
display: flex;
gap: 1rem;
width: 100%;
flex-wrap: wrap;
}
.sticky-note-textarea {
width: 100%;
padding: 12px;
border: 2px solid rgba(255, 215, 0, 0.3);
border-radius: 10px;
background: rgba(255, 235, 59, 0.07);
color: var(--text-color, #ffffff);
font-size: 1rem;
font-family: 'Segoe UI', Arial, sans-serif;
resize: vertical;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(255, 215, 0, 0.08);
box-sizing: border-box;
}
.sticky-note-color-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
flex: 1;
min-width: 120px;
}
.sticky-note-color-label {
font-weight: 600;
font-size: 0.95rem;
color: var(--text-color, #ffffff);
display: flex;
align-items: center;
gap: 0.5rem;
}
.sticky-note-color-input {
width: 100%;
height: 50px;
border: none !important;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 1px 4px rgba(255, 215, 0, 0.07);
}
.sticky-note-color-input:hover {
transform: scale(1.01);
}
.sticky-note-color-input::-webkit-color-swatch-wrapper {
padding: 4px;
border-radius: 10px;
}
.sticky-note-color-input::-webkit-color-swatch {
border: none;
border-radius: 8px;
}
.sticky-note-color-input::-moz-color-swatch {
border: none;
border-radius: 8px;
}
/* Responsive styles for small screens */
@media (max-width: 600px) {
.sticky-note-form {
padding: 0.7rem;
border-radius: 8px;
gap: 0.7rem;
}
.sticky-note-colors-row {
flex-direction: column;
gap: 0.7rem;
}
.sticky-note-color-group {
min-width: 0;
}
.sticky-note-textarea {
font-size: 0.95rem;
padding: 8px;
}
.sticky-note-color-input {
height: 38px;
border-radius: 8px;
}
}