/*
 * Copyright (c) 2024 Biovisuals Private Limited
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of Biovisuals Private Limited.
 * You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you entered into with Biovisuals Private Limited.
 */

/* additional-styles.css */


.color-picker {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.color-picker label {
    display: inline-block;
    padding: 10px;
    background-color: #333;
    color: white;
    cursor: pointer;
    border-radius: 50%;
}

.color-picker input[type="color"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    opacity: 0;
    cursor: pointer;
}

.color-picker input[type="color"]:focus,
.color-picker input[type="color"]:hover {
    opacity: 1;
    width: auto;
    height: auto;
    top: 40px;
    left: 0;
    z-index: 10;
}

/* Styling for buttons with icons and text */

/* Prevent text selection in toolbar and canvas area */
.top-tools, .svg-canvas-container, .right-tools, .image-library {
    user-select: none; /* Standard syntax */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    cursor: default; /* Prevent text cursor from appearing */
}
/* ---------------------------------Draw Tools-------------------------------------------------------------------------------------------------------------- */
/* 🎨 Floating Draw Tools Panel */
.draw-control-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    max-width: fit-content;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    z-index: 1000;
}

/* 🔹 Hide when Drawing Mode is Off */
.draw-control-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* 🖌️ Labels */
.draw-control-panel label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* 🎨 Fix Color Picker Size */
.draw-control-panel input[type="color"] {
    width: 45px; /* Increased size */
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 🔧 Fix Brush Size Slider */
.draw-control-panel input[type="range"] {
    width: 140px; /* Slightly wider */
    height: 4px; /* Reduced thickness */
    border-radius: 5px;
    background: linear-gradient(90deg, #007bff 0%, #00bcd4 100%);
    appearance: none;
    transition: 0.2s;
}

.draw-control-panel input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 2px solid #007bff;
    cursor: pointer;
    transition: 0.2s;
}


.draw-control-panel input[type="range"]:hover {
    opacity: 0.8;
}

/* 🖌️ Brush Type Dropdown */
.draw-control-panel select {
    padding: 6px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* 🖌️ Hover Effects */
.draw-control-panel select:hover,
.draw-control-panel input[type="color"]:hover,
.draw-control-panel input[type="range"]:hover {
    transform: scale(1.05);
}


/* 🔹 Mobile Responsive */
@media (max-width: 768px) {
    .draw-control-panel {
        bottom: 10px;
        left: 10px;
        flex-wrap: wrap;
        gap: 8px;
        padding: 6px 8px;
    }

    .draw-control-panel label {
        font-size: 11px;
    }

    .draw-control-panel input[type="range"] {
        width: 80px;
    }
}

/* 🟢 Active State - When Drawing is Enabled */
#drawModeBtn.active {
    background: linear-gradient(45deg, #007bff, #00bcd4);
    color: white;
    border: none;
    transform: scale(1.05);
}

#drawModeBtn:hover {
    background: #f0f0f0;
}

#drawModeBtn.active:hover {
    background: linear-gradient(45deg, #0056b3, #008cba);
}


#isolationOverlay {
    webkit-backdrop-filter: blur(1px);
  }
  
  .switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.switch input:checked + .slider.round {
  background-color: #4CAF50;
}

.switch input:checked + .slider.round:before {
  transform: translateX(20px);
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  font-family: 'Arial', sans-serif;
}


#project-title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  text-align: center;
  margin-right: auto;
}

.project-name-editable {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  padding: 4px 8px;
  cursor: text;
  border-bottom: 1px dashed transparent;
}

.project-name-editable:focus {
  outline: none;
  border-bottom: 1px dashed #007bff;
}


/* rotation in floation zoom slider */


.rotate-control input {
    width: 40px;
    text-align: center;
    padding: 2px;
}
/* Hide chrome in presentation */
body.presenting .top-tools,
body.presenting .image-library,
body.presenting #right-panel,
body.presenting .floating-zoom,
body.presenting #toggle-slider-button,
body.presenting #sliderContainer { display:none !important; }

/* Fullscreen the canvas container only */
html.presenting, body.presenting { overflow:hidden !important; width:100%; }
body.presenting .svg-canvas-container{
  position:fixed !important; inset:0 !important;
  width:100vw !important; height:100vh !important;
  margin:0 !important; overflow:hidden !important;
  background:#000; z-index:9999; contain:strict; touch-action:none;
}
body.presenting .svg-canvas-container canvas{ display:block; }




/* Toast container (inside .svg-canvas-container) */
#toastContainer {
  position: absolute;
  top: 40px;               /* below your top toolbar */
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;    /* allows clicks to pass through if needed */
}

.toast {
  pointer-events: auto;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
  max-width: min(70vw, 380px);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.info    { background: rgba(25,25,25,.92); }
.toast.success { background: #1d6f42; }
.toast.warn    { background: #a66300; }
.toast.error   { background: #8c1d18; }

/* Banners pinned to workArea / top-center */
.bio-banner {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  z-index: 1999;
  user-select: none;
  white-space: nowrap;
  max-width: min(75vw, 520px);
  pointer-events: auto;
}
.bio-banner .close {
  margin-left: 6px;
  cursor: pointer;
  opacity: .85;
  font-weight: 700;
}
.bio-banner.info    { background: rgba(25,25,25,.92); color: #fff; }
.bio-banner.success { background: #1d6f42; color: #fff; }
.bio-banner.warn    { background: #a66300;  color: #fff; }
.bio-banner.error   { background: #8c1d18;  color: #fff; }

/* Optional: docked top-center style */
.bio-banner.dock-top-center {
  /* left/top set by JS; this class only tags the mode */
}

/*------------------------dynamic-btns-container------------ */
.dynamic-btns-container{
   position: absolute;
    top: 45px;
    right: 500px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent; /* or your preferred background */
}
.dynamic-btns-container button{
  color:#000000;
  border:0; border-radius:8px; padding:6px 10px; cursor:pointer;
  background: #ffffff;
}

#cropApplyBtn, #cropCancelBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


/* optional */
#scissorToolBtn.is-disabled { opacity: 0.5; pointer-events: none; }


/* rt-cursor for realtime sharing */
.rt-cursor { transform: translate(-4px, -12px); display:flex; align-items:center; gap:6px; }
.rt-dot { width:8px; height:8px; border-radius:50%; background:#0aa; box-shadow:0 0 0 2px rgba(0,0,0,.1); }
.rt-tag { font: 500 11px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color:#fff; background:#0aa; padding:3px 6px; border-radius:6px; pointer-events:none; }


.presence-bar{
  position:absolute; top:8px; right:12px; display:flex; gap:6px; z-index:200;
}
.presence-chip{
  display:flex; align-items:center; gap:6px; background:#fff; border:1px solid #e6e6e6;
  border-radius:999px; padding:4px 8px; box-shadow:0 1px 2px rgba(0,0,0,.06);
  max-width:160px; overflow:hidden;
}
.presence-chip img{ width:20px; height:20px; border-radius:50%; object-fit:cover; }
.presence-chip .dot{ width:8px; height:8px; border-radius:50%; }
.presence-chip .name{ font-size:12px; color:#333; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.cursor-overlay{
  position:absolute; inset:0; pointer-events:none; z-index:150; /* above canvas */
}
.remote-cursor{
  position:absolute; transform:translate(-50%,-50%); pointer-events:none;
  display:flex; align-items:center; gap:6px;
}
.remote-cursor .cursor-dot{
  width:8px; height:8px; border-radius:50%;
  box-shadow:0 0 0 2px #fff; /* halo for contrast */
}
.remote-cursor .cursor-label{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:6px;
  padding:2px 6px; font-size:11px; color:#333; box-shadow:0 1px 2px rgba(0,0,0,.06);
}

.disabled-feature {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto; /* we still need to catch the click and show the notice */
}

