/* Stili per VectorBoard */

.svg-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    overflow: visible; /* Permette al contenuto di essere visibile oltre i limiti */
    touch-action: none;
}

.svg-container, .svg-container * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -ms-user-select: none !important;
    -moz-user-select: none !important;
}

/* Add scrolling capability when zoomed */
.svg-container.zoomed {
    overflow: auto;
}

.vector-board-scroll-container {
    min-width: 100%;
    min-height: 100%;
    transform-origin: 0 0;
    overflow: auto !important; /* Forza lo scroll quando necessario */
    max-height: 100%; /* Assicura che il container non superi l'altezza del contenitore padre */
}

/* Custom scrollbar styling */
.svg-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.svg-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.svg-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.svg-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Stile per la scrollbar personalizzata */
.vector-board-scroll-container::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.vector-board-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.vector-board-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.vector-board-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Add grid pattern */
.grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(#ddd 1px, transparent 1px), 
                      linear-gradient(90deg, #ddd 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.grid-background.visible {
    opacity: 0.5;
}

/* Default styles for the SVG element */
.svg-container svg {
    display: block;
    background-color: transparent;
}

/* Style for the path elements */
.svg-container path {
    vector-effect: non-scaling-stroke;
}

/* Style for eraser paths */
.svg-container .eraser-path {
    stroke: white;
    stroke-linecap: round;
}

/* Stili per la modalità fullscreen */
.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.fullscreen-toolbar {
    display: block !important;
    width: 100%;
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.fullscreen-container #drawing-container {
    flex: 1;
    position: relative;
    width: 100% !important;
    height: auto !important;
    overflow: hidden;
}

.drawing-container {
    position: relative;
    width: 100%;
    height: 100vh; /* Usa l'altezza della viewport come riferimento */
    overflow: hidden; /* Nasconde overflow nel container esterno */
}

.exit-fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.exit-fullscreen-btn:hover {
    opacity: 1;
}

/* Stili per il pulsante di estensione della lavagna */
.extend-board-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0078d7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: none;
}

.extend-board-btn:hover {
    background-color: #005fa3;
    transform: scale(1.05);
}

.extend-board-btn:active {
    transform: scale(0.95);
}

/* Stili per gli sfondi aggiuntivi */
/* Background a righe tipo quaderno */
.lines-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(#0078d7 1px, transparent 1px);
    background-size: 100% 32px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.lines-background.visible {
    opacity: 0.3;
}

/* Colori di sfondo alternativi */
.svg-container.bg-white {
    background-color: #ffffff;
}

.svg-container.bg-blue {
    background-color: #e6f2ff;
}

.svg-container.bg-black {
    background-color: #222222;
}

.svg-container.bg-anthracite {
    background-color: #36454f;
}

/* Adatta il colore delle linee e della griglia in base allo sfondo */
.svg-container.bg-black .grid-background,
.svg-container.bg-anthracite .grid-background {
    background-image: linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px), 
                      linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
}

.svg-container.bg-black .lines-background,
.svg-container.bg-anthracite .lines-background {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px);
}

/* Stile per il selettore di sfondo */
.background-selector {
    display: inline-block;
    position: relative;
}

.background-selector .dropdown-menu {
    min-width: 220px;
}

.background-color-option {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border: 1px solid #ccc;
    vertical-align: middle;
}

.background-white {
    background-color: #ffffff;
}

.background-blue {
    background-color: #e6f2ff;
}

.background-black {
    background-color: #222222;
}

.background-anthracite {
    background-color: #36454f;
}

.text-move-icon, .text-delete-icon{
    width: 30px !important;
    text-align: center !important;
}
