/* Mathematical Whiteboard Styles */

/* Ensure body and html fill viewport - only for whiteboard page */
body.whiteboard-page,
body.whiteboard-page html {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Override main-content padding/margin for whiteboard */
body .main-content.whiteboard-main {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.whiteboard-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    background: #f5f5f5;
    overflow: hidden;
    margin: 0;
    padding: 0;
    flex: 1;
}

.measurement-panel {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.whiteboard-container.has-pdf {
    /* Adjust layout when PDF is loaded */
}

.whiteboard-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
    flex-shrink: 0;
    min-height: fit-content;
}

.tool-group {
    display: flex;
    gap: 4px;
    padding: 0 8px;
    border-right: 1px solid #e0e0e0;
}

.tool-group:last-child {
    border-right: none;
}

.tool-btn {
    width: 40px;
    min-height: 40px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
    color: #333;
    padding: 4px 2px;
    gap: 2px;
}

.tool-btn .tool-label {
    font-size: 9px;
    line-height: 1;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    color: inherit;
    opacity: 0.8;
    box-sizing: border-box;
    padding: 0 1px;
}

.eraser-mode-btn .tool-label {
    font-size: 8px;
}

.tool-btn:hover {
    background: #f0f0f0;
    border-color: #c90c0f;
}

.tool-btn.active {
    background: #c90c0f;
    color: #ffffff;
    border-color: #c90c0f;
}

/* Enhanced tooltips */
.tool-btn[title],
.style-btn[title],
input[title] {
    position: relative;
}

.tool-btn[title]:hover::after,
.style-btn[title]:hover::after,
input[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: 250px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.tool-btn[title]:hover::before,
.style-btn[title]:hover::before,
input[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 1000;
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
}

.color-picker-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.stroke-width-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
}

.stroke-width-wrapper label {
    font-size: 12px;
    color: #666;
}

.stroke-width-wrapper input[type="range"] {
    width: 80px;
}

.stroke-width-wrapper span {
    font-size: 12px;
    min-width: 20px;
    text-align: right;
}

/* Text Formatting Toolbar */
.text-formatting-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 99;
    flex-shrink: 0;
    align-items: center;
}

.text-tool-group {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 0 8px;
    border-right: 1px solid #e0e0e0;
}

.text-tool-group:last-child {
    border-right: none;
}

.text-tool-group label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.text-control-select {
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    background: #ffffff;
    cursor: pointer;
    min-width: 100px;
    transition: border-color 0.2s;
}

.text-control-select:hover {
    border-color: #c90c0f;
}

.text-control-select:focus {
    outline: none;
    border-color: #c90c0f;
}

.text-format-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
}

.text-format-btn:hover {
    background: #f0f0f0;
    border-color: #c90c0f;
}

.text-format-btn.active {
    background: #c90c0f;
    color: #ffffff;
    border-color: #c90c0f;
}

.text-color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-color-picker-wrapper input[type="color"] {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.text-color-picker-wrapper input[type="color"]:hover {
    border-color: #c90c0f;
}

/* Fill Toggle */
.fill-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fill-color-input {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s, width 0.2s;
}

.fill-toggle-wrapper.active .fill-color-input {
    opacity: 1;
    width: 36px;
    overflow: visible;
}

.fill-color-input:hover {
    border-color: #c90c0f;
}

.fill-toggle-wrapper.active #fillToggleBtn {
    background: #c90c0f;
    color: #ffffff;
    border-color: #c90c0f;
}

.line-style-wrapper {
    display: flex;
    gap: 4px;
}

.style-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.style-btn:hover {
    background: #f0f0f0;
    border-color: #c90c0f;
}

.style-btn.active {
    background: #c90c0f;
    color: #ffffff;
    border-color: #c90c0f;
}

.eraser-mode-selector {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-left: 4px;
}

.eraser-mode-btn {
    width: 36px;
    min-height: 36px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
    padding: 4px 2px;
    gap: 2px;
}

.eraser-mode-btn:hover {
    background: #f0f0f0;
    border-color: #c90c0f;
}

.eraser-mode-btn.active {
    background: #c90c0f;
    color: #ffffff;
    border-color: #c90c0f;
}

.eraser-size-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    margin-left: 4px;
}

.eraser-size-wrapper label {
    font-size: 12px;
    color: #666;
}

.eraser-size-wrapper input[type="range"] {
    width: 80px;
}

.eraser-size-wrapper span {
    font-size: 12px;
    min-width: 20px;
    text-align: right;
}

.whiteboard-canvas-wrapper {
    flex: 1 1 0;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    cursor: crosshair;
    min-height: 0;
    margin: 0;
    padding: 0;
    width: 100%;
}

#whiteboardCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.measurement-panel {
    position: relative;
    background: #ffffff;
    border-top: 2px solid #e0e0e0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.measurement-panel-toggle {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 32px;
    background: #c90c0f;
    color: #ffffff;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.2);
    transition: background 0.2s;
    z-index: 10;
}

.measurement-panel-toggle:hover {
    background: #a00a0c;
}

.measurement-panel-content {
    display: flex;
    gap: 16px;
    padding: 12px;
    flex-wrap: wrap;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
}

.measurement-panel-content.hidden {
    max-height: 0;
    opacity: 0;
    padding: 0 12px;
}

.measurement-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.measurement-item label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.measurement-item span {
    font-size: 14px;
    color: #333;
    min-width: 60px;
}

.measurement-item select {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    background: #ffffff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 999999; /* Very high z-index to ensure it appears above iframe containers */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.2s;
    pointer-events: auto; /* Ensure modal can receive pointer events */
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s;
    pointer-events: auto; /* Ensure modal content can receive pointer events */
    position: relative; /* Ensure proper stacking context */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.setting-group {
    margin-bottom: 16px;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.setting-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.setting-group input[type="number"],
.setting-group select {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    margin-left: 8px;
}

/* Confirmation Modal Styles */
.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-confirm {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.btn-confirm-cancel {
    background-color: #f0f0f0;
    color: #333;
}

.btn-confirm-cancel:hover {
    background-color: #e0e0e0;
}

.btn-confirm-ok {
    background-color: #c90c0f;
    color: #ffffff;
}

.btn-confirm-ok:hover {
    background-color: #a00a0c;
}

.export-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.export-btn {
    flex: 1;
    min-width: 120px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 16px;
    color: #333;
}

.export-btn:hover {
    background: #f0f0f0;
    border-color: #c90c0f;
    transform: translateY(-2px);
}

.export-btn i {
    font-size: 32px;
    color: #c90c0f;
}

/* Grid Pattern */
.canvas-grid {
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Responsive Design */
/* Tablet view - hide button labels */
@media (min-width: 769px) and (max-width: 1024px) {
    .tool-btn .tool-label,
    .eraser-mode-btn .tool-label {
        display: none;
    }
    
    .tool-btn {
        padding: 4px;
    }
}

/* Mobile view */
@media (max-width: 768px) {
    .whiteboard-toolbar {
        flex-direction: column;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .tool-group {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    
    .tool-group:last-child {
        border-bottom: none;
    }
    
    .measurement-panel {
        flex-direction: column;
        gap: 8px;
    }
    
    .tool-btn {
        width: 44px;
        min-height: 44px;
    }
    
    .tool-btn .tool-label {
        font-size: 8px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Ruler, Protractor, Compass Visual Styles */
.ruler-overlay {
    stroke: #333;
    stroke-width: 2;
    fill: rgba(255,255,255,0.8);
}

.protractor-overlay {
    stroke: #333;
    stroke-width: 2;
    fill: rgba(255,255,255,0.7);
}

.compass-overlay {
    stroke: #c90c0f;
    stroke-width: 2;
    fill: none;
}

.handle {
    fill: #c90c0f;
    stroke: #ffffff;
    stroke-width: 2;
    cursor: move;
}

.handle:hover {
    fill: #a00a0c;
}

.rotation-handle {
    fill: #4ECDC4;
    stroke: #ffffff;
    stroke-width: 2;
    cursor: grab;
}

.rotation-handle:hover {
    fill: #3ba8a0;
}

.measurement-label {
    font-family: Arial, sans-serif;
    font-size: 12px;
    fill: #333;
    pointer-events: none;
}

/* PDF Controls Sidebar */
.pdf-controls-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
}

.pdf-sidebar-toggle {
    width: 32px;
    height: 64px;
    background: #c90c0f;
    color: #ffffff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 2px 0 4px rgba(0,0,0,0.2);
    transition: background 0.2s;
    z-index: 101;
    pointer-events: auto; /* Always allow clicks on toggle button */
    position: relative; /* Ensure it's above other elements */
}

.pdf-sidebar-toggle:hover {
    background: #a00a0c;
}

.pdf-controls-content {
    background: #ffffff;
    border-right: 2px solid #e0e0e0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    margin-left: -8px;
}

.pdf-controls-content:not(.hidden) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.pdf-control-group-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.pdf-control-group-vertical:last-child {
    border-bottom: none;
}

.pdf-control-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
}

.pdf-control-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #c90c0f;
}

/* Graph Plotter Controls */
.graph-plotter-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #ffffff;
    border: 2px solid #c90c0f;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
}

.graph-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.graph-control-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.graph-type-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.graph-type-select:hover {
    border-color: #c90c0f;
}

.graph-type-select:focus {
    outline: none;
    border-color: #c90c0f;
}

.graph-control-btn {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.graph-control-btn:hover {
    background: #f0f0f0;
    border-color: #c90c0f;
    color: #c90c0f;
}

.graph-control-btn i {
    font-size: 14px;
}

#graphPointCount {
    font-size: 14px;
    color: #666;
    text-align: center;
    padding: 4px 0;
}

/* Tutorial Panel Styles */
.tutorial-panel {
    position: fixed;
    top: 20px;
    right: -400px;
    width: 380px;
    max-height: calc(100vh - 40px);
    background: white;
    border: 2px solid #C90C0F;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tutorial-panel.active {
    right: 20px;
}

.tutorial-header {
    background: linear-gradient(135deg, #C90C0F 0%, #FAB719 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.tutorial-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tutorial-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tutorial-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tutorial-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 200px);
}

.tutorial-step {
    animation: fadeIn 0.3s ease;
}

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

.tutorial-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tutorial-step-number {
    background: #FAB719;
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tutorial-step h4 {
    color: #C90C0F;
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
}

.tutorial-step p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tutorial-actions {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.tutorial-actions li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    color: #555;
    position: relative;
    line-height: 1.5;
}

.tutorial-actions li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #C90C0F;
    font-weight: bold;
}

.tutorial-tip {
    background: #fff9e6;
    border-left: 4px solid #FAB719;
    padding: 0.75rem;
    margin-top: 1rem;
    border-radius: 4px;
    color: #555;
    line-height: 1.5;
}

.tutorial-footer {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    background: #f9f9f9;
}

.tutorial-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background: #C90C0F;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.tutorial-btn:hover {
    background: #a00a0c;
}

.tutorial-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pdf-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pdf-control-btn.active {
    background: #c90c0f;
    color: #ffffff;
    border-color: #c90c0f;
}

.pdf-page-info,
.pdf-zoom-info {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    text-align: center;
    padding: 4px 0;
    min-width: 60px;
}

@media (max-width: 768px) {
    .pdf-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .pdf-control-group {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 8px;
        margin-bottom: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .pdf-control-group:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}

/* Fullscreen mode styles */
.whiteboard-container:fullscreen,
.whiteboard-container:-webkit-full-screen,
.whiteboard-container:-moz-full-screen,
.whiteboard-container:-ms-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: #f5f5f5 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.whiteboard-container:fullscreen .whiteboard-canvas-wrapper,
.whiteboard-container:-webkit-full-screen .whiteboard-canvas-wrapper,
.whiteboard-container:-moz-full-screen .whiteboard-canvas-wrapper,
.whiteboard-container:-ms-fullscreen .whiteboard-canvas-wrapper {
    flex: 1 !important;
    height: calc(100vh - 80px) !important;
    min-height: calc(100vh - 80px) !important;
    max-height: calc(100vh - 80px) !important;
}

/* Ensure body/html don't interfere with fullscreen */
:fullscreen,
:-webkit-full-screen,
:-moz-full-screen,
:-ms-fullscreen {
    overflow: hidden !important;
}
