/* Edit Page - Kendo-style Toolbar Styles */

/* Kendo-style Toolbar */
.k-toolbar-wrapper {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
 box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
  top: 0;
    z-index: 1000;
}

.k-toolbar {
    display: flex;
    flex-wrap: wrap;
 align-items: center;
    gap: 8px;
padding: 8px 12px;
    min-height: 48px;
}

.k-toolbar-group {
    display: flex;
align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.k-toolbar-group-stretched {
    flex-grow: 1;
    max-width: 300px;
    min-width: 150px;
}

.k-toolbar-separator {
    width: 1px;
    height: 32px;
    background: #e0e0e0;
    flex-shrink: 0;
}

.k-toolbar-spacer {
    flex-grow: 1;
}

.k-toolbar-label {
  font-size: 14px;
    color: #424242;
    white-space: nowrap;
    margin-right: 4px;
}

/* Kendo-style Buttons */
.k-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #424242;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
  text-decoration: none;
    white-space: nowrap;
}

.k-button:hover {
 background: #f5f5f5;
border-color: #d0d0d0;
}

.k-button:active {
    background: #e8e8e8;
}

.k-button-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

.k-button-icon i {
    font-size: 18px;
}

.k-button-flat {
    background: transparent;
    border-color: transparent;
}

.k-button-flat:hover {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

/* Active tool state */
.k-button.active {
    background: #2196f3;
    color: #fff;
    border-color: #2196f3;
}

.k-button.active:hover {
    background: #1e88e5;
border-color: #1e88e5;
}

/* Disabled button state */
.k-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #9e9e9e;
}

.k-button:disabled:hover {
    background: #f5f5f5;
    border-color: #e0e0e0;
    transform: none;
}

/* Slider */
.k-slider {
 flex-grow: 1;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    background: #e0e0e0;
}

.k-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
height: 18px;
    border-radius: 50%;
    background: #2196f3;
cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.k-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2196f3;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Color Picker */
.k-color-picker {
width: 44px;
    height: 36px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

/* Badges */
.k-toolbar-badge {
display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    padding: 0 8px;
  background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
  font-size: 13px;
    font-weight: 600;
}

.k-badge-zoom {
    background: #f3e5f5;
  color: #7b1fa2;
}

/* Canvas Container */
.canvas-container {
    height: calc(100vh - 64px);
    overflow: hidden;
    background: #ffffff;
}

.canvas-wrapper-hidden {
    display: none;
}

#canvasWrapper {
    width: 100%;
  height: 100%;
    overflow: auto;
    display: none;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

#canvasWrapper.canvas-visible {
  display: flex;
}

#canvasContainer {
  display: inline-block;
    position: relative;
    margin: 20px;
}

#drawingCanvas {
    cursor: crosshair;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    touch-action: none;
}

#canvasWrapper::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

#canvasWrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#canvasWrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 7px;
}

#canvasWrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Fullscreen Mode */
.fullscreen-mode #toolbar {
    display: none !important;
}

.fullscreen-mode .canvas-container {
 position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
  height: 100vh;
 z-index: 9999;
  background: #ffffff;
}

.fullscreen-exit-btn,
.fullscreen-clear-btn,
.fullscreen-color-btn,
.fullscreen-nav-btn {
    position: fixed;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.95);
    color: #424242;
    border: 1px solid #e0e0e0;
  border-radius: 8px;
 font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px;
    width: 44px;
    height: 44px;
}

/* Icon sizing - consistent across all buttons */
.fullscreen-exit-btn i,
.fullscreen-clear-btn i,
.fullscreen-nav-btn i {
    font-size: 20px;
}

/* Override k-hidden when in fullscreen mode */
.fullscreen-mode .fullscreen-exit-btn:not(.k-hidden),
.fullscreen-mode .fullscreen-clear-btn:not(.k-hidden),
.fullscreen-mode .fullscreen-color-btn:not(.k-hidden),
.fullscreen-mode .fullscreen-nav-btn:not(.k-hidden) {
    display: inline-flex !important;
}

/* Exit button - top right corner */
.fullscreen-exit-btn {
    top: 20px;
    right: 20px;
}

/* Clear button - next to exit button */
.fullscreen-clear-btn {
    top: 20px;
    right: 76px;
}

/* Color picker button - next to clear button */
.fullscreen-color-btn {
    top: 20px;
    right: 132px;
    padding: 4px;
}

/* Color picker input styling */
.fullscreen-color-input {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}

/* Previous button - center left */
.fullscreen-prev-btn {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

/* Next button - center right */
.fullscreen-next-btn {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

/* Hover effects - all buttons behave identically */
.fullscreen-exit-btn:hover,
.fullscreen-clear-btn:hover,
.fullscreen-color-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Navigation buttons maintain vertical centering on hover */
.fullscreen-prev-btn:hover,
.fullscreen-next-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

/* Tablet Responsive */
@media (max-width: 991px) {
    .k-toolbar {
     gap: 6px;
  padding: 6px 8px;
    }

    .k-toolbar-separator {
        display: none;
    }

    .k-toolbar-group-stretched {
        order: 10;
    flex-basis: 100%;
max-width: none;
        margin-top: 4px;
    }

 .k-button-icon {
        width: 42px;
   height: 42px;
    }

    .k-button-icon i {
 font-size: 20px;
}

    .k-color-picker {
  width: 50px;
  height: 42px;
    }

    .k-button-text {
        display: none;
    }

    .k-button {
        padding: 8px 12px;
    }

    .canvas-container {
  height: calc(100vh - 110px);
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .k-toolbar {
 padding: 4px 6px;
  gap: 4px;
  }

    .k-toolbar-label {
      font-size: 12px;
    }

    .k-button {
  padding: 6px 10px;
    font-size: 13px;
    }

 .k-button-icon {
  width: 40px;
    height: 40px;
    }

  .k-toolbar-badge {
   min-width: 28px;
     height: 22px;
font-size: 12px;
   padding: 0 6px;
 }

    .canvas-container {
   height: calc(100vh - 120px);
 }

    /* All fullscreen buttons - mobile sizing */
    .fullscreen-exit-btn,
    .fullscreen-clear-btn,
    .fullscreen-color-btn,
    .fullscreen-nav-btn {
        padding: 10px;
      width: 40px;
        height: 40px;
    }

    .fullscreen-color-btn {
        padding: 4px;
    }

    .fullscreen-color-input {
   width: 32px;
  height: 32px;
    }

    .fullscreen-exit-btn {
        top: 12px;
  right: 12px;
    }

    .fullscreen-clear-btn {
    top: 12px;
   right: 64px;
    }

    .fullscreen-color-btn {
        top: 12px;
  right: 116px;
    }

    .fullscreen-prev-btn {
        top: 50%;
        left: 12px;
  transform: translateY(-50%);
    }

    .fullscreen-next-btn {
        top: 50%;
        right: 12px;
   transform: translateY(-50%);
    }

  .fullscreen-exit-btn i,
    .fullscreen-clear-btn i,
    .fullscreen-nav-btn i {
        font-size: 18px;
  }

    .fullscreen-prev-btn:hover {
        transform: translateY(-50%) translateY(-2px);
    }

    .fullscreen-next-btn:hover {
  transform: translateY(-50%) translateY(-2px);
    }

    .fullscreen-color-btn:hover {
     transform: translateY(-2px);
    }
}
