/*!****************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[3]!./styles/rhinestone-designer.css ***!
  \****************************************************************************************************************************************************************************************************************************************************************************/
.designer-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 100px);
}

/* Stone Counter Styles */
.stone-counter-section {
  margin-top: 0.5rem;
}

.stone-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 0.5rem;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stone-counter-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
}

.stone-counter-size {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
}

.stone-counter-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}

.stone-counter-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
}

.stone-counter-total span {
  font-weight: 700;
  color: #1f2937;
}

/* Top Toolbar Styles */
.top-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: white;
  height: 56px;
}

/* Add this to style the logo in the toolbar */
.toolbar-logo {
  display: flex;
  align-items: center;
  margin-right: 15px;
  height: 35px;
}

.toolbar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.25rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  transition: all 0.2s ease;
}

.toolbar-button:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.toolbar-button.active {
  background-color: #e0f2fe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* Toolbar select and spacing input styles */
.toolbar-select {
  padding: 0.375rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
  min-width: 120px;
  margin-left: 0.5rem;
}

.toolbar-select:hover {
  border-color: #d1d5db;
}

.toolbar-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.toolbar-spacing-control {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  padding: 0 0.5rem;
}

.toolbar-spacing-control label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-right: 0.25rem;
}

.toolbar-spacing-input {
  width: 50px;
  padding: 0.375rem 0.25rem;
  border: none;
  background-color: transparent;
  font-size: 0.875rem;
  color: #4b5563;
  text-align: center;
}

.toolbar-spacing-input:hover {
  background-color: #f9fafb;
}

.toolbar-spacing-input:focus {
  outline: none;
}

.toolbar-spacing-unit {
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: 0.125rem;
}

/* Dimension controls */
.toolbar-dimension-control {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  padding: 0 0.5rem;
}

.toolbar-dimension-control label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-right: 0.25rem;
}

.toolbar-dimension-input {
  width: 50px;
  padding: 0.375rem 0.25rem;
  border: none;
  background-color: transparent;
  font-size: 0.875rem;
  color: #4b5563;
  text-align: center;
}

.toolbar-dimension-input:hover {
  background-color: #f9fafb;
}

.toolbar-dimension-input:focus {
  outline: none;
}

.toolbar-dimension-unit {
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: 0.25rem;
  margin-right: 0.5rem;
  min-width: 20px;
  text-align: center;
}

.toolbar-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toolbar-button.unsaved-changes {
  background-color: #fef3c7;
  border-color: #f59e0b;
}

.toolbar-button.unsaved-changes:hover {
  background-color: #fde68a;
}

.unsaved-indicator {
  color: #f59e0b;
  font-size: 12px;
  margin-left: 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.toolbar-button.with-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  padding: 0 0.5rem;
  gap: 0.5rem;
}

.toolbar-dropdown {
  position: relative;
}

.toolbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 50;
  width: 200px;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.dropdown-header {
  padding: 0.5rem;
  font-weight: 500;
  color: #4b5563;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.dropdown-items {
  padding: 0.25rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  width: 100%;
  text-align: left;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

.dropdown-item.active {
  background-color: #e0f2fe;
  color: #1d4ed8;
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 0.25rem 0;
}

.dropdown-setting {
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.dropdown-setting-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.dropdown-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

.dropdown-setting-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.dropdown-setting-description {
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: 1.5rem;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background-color: #e5e7eb;
  margin: 0 0.25rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: white;
}

.toolbar-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.toolbar-label {
  font-weight: 500;
}

/* Common Dropdown Styles */
.dropdown-container {
  position: relative;
  z-index: 50;
}

.dropdown-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  min-width: 160px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dropdown-button:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdown-arrow {
  color: #6b7280;
  transition: transform 0.2s ease;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.size-dropdown-menu {
  width: 320px;
}

.color-dropdown-menu {
  width: 280px;
}

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

.dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.dropdown-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.dropdown-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.dropdown-section:last-child {
  border-bottom: none;
}

.dropdown-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Size Dropdown Specific Styles */
.selected-size {
  flex: 1 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 0.5rem;
  gap: 0.5rem;
}

.size-grid-item {
  padding: 0.5rem;
  border-radius: 0.375rem;
  background-color: #f3f4f6;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
}

.size-grid-item:hover {
  background-color: #e5e7eb;
}

.size-grid-item.active {
  background-color: #3b82f6;
  color: white;
}

/* Shape Grid Styles */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.shape-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
  position: relative;
}

.shape-grid-item:hover:not(.disabled) {
  background-color: #f3f4f6;
}

.shape-grid-item.active {
  background-color: #e0f2fe;
}

.shape-grid-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.shape-preview {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  background-color: #f3f4f6;
  border-radius: 0.375rem;
  padding: 0.5rem;
  position: relative;
}

.shape-lock {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background-color: #e5e7eb;
  border-radius: 9999px;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  border: 2px solid white;
}

.shape-name {
  font-size: 0.75rem;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.coming-soon {
  font-size: 0.625rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}

/* Color Dropdown Specific Styles */
.selected-color-preview {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  /* Use clip-path to create a faceted gemstone shape */
  -webkit-clip-path: polygon(50% 0%, 80% 10%, 100% 35%, 100% 70%, 80% 90%, 50% 100%, 20% 90%, 0% 70%, 0% 35%, 20% 10%);
          clip-path: polygon(50% 0%, 80% 10%, 100% 35%, 100% 70%, 80% 90%, 50% 100%, 20% 90%, 0% 70%, 0% 35%, 20% 10%);
}

.selected-color-preview::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.5) 100%
  );
  pointer-events: none;
}

.selected-color-name {
  flex: 1 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 0.5rem;
  gap: 0.5rem;
  padding: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}

.color-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.color-grid-item:hover {
  background-color: #f3f4f6;
}

.color-grid-item.active {
  background-color: #e0f2fe;
}

.color-stone {
  width: 2rem;
  height: 2rem;
  position: relative;
  /* Use clip-path to create a faceted gemstone shape */
  -webkit-clip-path: polygon(50% 0%, 80% 10%, 100% 35%, 100% 70%, 80% 90%, 50% 100%, 20% 90%, 0% 70%, 0% 35%, 20% 10%);
          clip-path: polygon(50% 0%, 80% 10%, 100% 35%, 100% 70%, 80% 90%, 50% 100%, 20% 90%, 0% 70%, 0% 35%, 20% 10%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Create facet effects with pseudo-elements */
.color-stone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
}

.color-stone::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.8) 0%,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0) 60%,
      rgba(255, 255, 255, 0.5) 100%
    ),
    linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 40%,
      rgba(255, 255, 255, 0) 60%,
      rgba(0, 0, 0, 0.2) 100%
    );
  z-index: 2;
}

/* Add a center highlight to simulate the table facet */
.color-stone > span {
  position: absolute;
  top: 30%;
  left: 30%;
  width: 40%;
  height: 40%;
  background: rgba(255, 255, 255, 0.7);
  -webkit-clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
          clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: 3;
  transform: rotate(45deg);
}

.color-name {
  font-size: 0.75rem;
  color: #4b5563;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.manual-stone-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background-color: #e5e7eb;
}

.manual-stone-button.active {
  background-color: #3b82f6;
  color: white;
}

.manual-stone-button:hover {
  background-color: #d1d5db;
}

.manual-stone-button.active:hover {
  background-color: #2563eb;
}

.export-button {
  padding: 0.25rem 0.75rem;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
}

.export-button:hover {
  background-color: #d1d5db;
}

.orientation-button {
  margin-left: 0.5rem;
  padding: 0.25rem 0.75rem;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
}

.orientation-button:hover {
  background-color: #d1d5db;
}

/* Stone Options Panel Styles */
.stone-options-panel {
  width: 200px; /* Reduced from 220px (25% reduction) */
  border-right: 1px solid #e5e7eb;
  background-color: white;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Reduced from 1rem */
  overflow-y: auto;
}

.panel-header {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.panel-title {
  font-weight: 600;
  font-size: 1rem;
  color: #374151;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-title {
  font-weight: 500;
  font-size: 0.875rem;
  color: #4b5563;
}

.size-grid-horizontal {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.size-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
  background-color: white;
  transition: all 0.2s ease;
  flex: 1 1;
}

.size-grid-item:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.size-grid-item.active {
  background-color: #e0f2fe;
  border-color: #93c5fd;
}

.size-preview {
  border-radius: 50%;
  background-color: #d1d5db;
}

.color-grid-two-column {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 0.5rem;
  gap: 0.5rem;
}

.color-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
  background-color: white;
  transition: all 0.2s ease;
}

.color-grid-item:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.color-grid-item.active {
  background-color: #e0f2fe;
  border-color: #93c5fd;
}

.color-stone {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.color-stone::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.5) 100%
  );
  pointer-events: none;
}

.color-name {
  font-size: 0.75rem;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.manual-stone-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
  background-color: white;
  color: #4b5563;
  transition: all 0.2s ease;
  width: 100%;
}

.manual-stone-button:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.manual-stone-button.active {
  background-color: #e0f2fe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.main-content {
  display: flex;
  flex: 1 1;
  overflow: hidden;
}

.tools-panel {
  width: 12rem;
  border-right: 1px solid #e5e7eb;
  background-color: white;
  padding: 0.125rem;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease-in-out;
}

.tools-panel.collapsed {
  width: 2.75rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.panel-header.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.125rem;
  padding: 0.125rem 0.375rem;
  border-bottom: 1px solid #e5e7eb;
}

.tools-panel.collapsed .panel-header.compact {
  justify-content: center;
  padding: 0.5rem 0;
}

.collapse-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  z-index: 10;
}

.tools-panel.collapsed .collapse-button {
  margin: 0 auto;
}

.collapse-button:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.panel-title {
  font-weight: 500;
}

.add-button {
  padding: 0.25rem;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.25rem;
}

.add-button:hover {
  background-color: #2563eb;
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  flex: 1 1;
}

.tool-section {
  margin-bottom: 0.25rem;
}

.tool-section-title {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b7280;
  padding: 0.125rem 0.375rem;
  margin-bottom: 0.125rem;
}

.tool-section-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
}

.collapsed .tool-section-buttons {
  flex-direction: column;
  align-items: center;
}

.tool-button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.375rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  width: 100%;
}

.tool-button.icon-only {
  justify-content: center;
  padding: 0.25rem;
  width: auto;
}

.tool-button:hover {
  background-color: #f3f4f6;
}

.tool-button.active {
  background-color: #e0f2fe;
}

.canvas-container {
  flex: 1 1;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  /* background-color: #f3f4f6; */ /* Removed to allow dynamic background from store */
  position: relative;
  display: flex;
}

.design-canvas {
  width: 100%;
  height: 100%;
}

.design-canvas.panning,
.design-canvas.middle-panning {
  cursor: -webkit-grab;
  cursor: grab;
}

.design-canvas.panning:active,
.design-canvas.middle-panning:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

.design-canvas.selecting {
  cursor: crosshair;
}

/* Add this to improve the visibility of the selection box */
.marquee-selection {
  position: absolute;
  border: 1px dashed #0066ff;
  background-color: rgba(0, 102, 255, 0.1);
  pointer-events: none;
}

/* Canvas layout */
.canvas-wrapper {
  position: absolute;
  top: 25px;
  left: 25px;
  right: 0;
  bottom: 0;
  overflow: hidden;
  width: calc(100% - 25px);
  height: calc(100% - 25px);
}

.ruler-corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 25px;
  height: 25px;
  background-color: #f0f0f0;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add styles for the ruler toggle button */
.ruler-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 10px;
  padding: 0;
  flex-direction: column;
}

.ruler-toggle:hover {
  background-color: #e5e7eb;
  color: #333;
}

.ruler-toggle span {
  font-size: 8px;
  font-weight: bold;
  margin: -2px 0;
}

.ruler-container {
  position: absolute;
  background-color: #f5f5f5;
  z-index: 5;
}

.ruler-container.horizontal {
  top: 0;
  left: 25px;
  right: 0;
  height: 25px;
  border-bottom: 1px solid #ccc;
}

.ruler-container.vertical {
  top: 25px;
  left: 0;
  width: 25px;
  bottom: 0;
  border-right: 1px solid #ccc;
}

.canvas-ruler {
  position: absolute;
  background-color: #f5f5f5;
}

.canvas-ruler.horizontal {
  width: 100%;
  height: 25px;
}

.canvas-ruler.vertical {
  width: 25px;
  height: 100%;
}

.layers-panel {
  width: 16rem;
  border-left: 1px solid #e5e7eb;
  background-color: white;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  z-index: 10;
  position: relative;
  height: 100%;
}

.layers-list {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  overflow-y: auto;
  min-height: 200px;
  position: relative;
}

.layers-list.drag-active {
  background-color: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 0.5rem;
}

/* Empty layers message */
.no-layers-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  color: #6b7280;
}

.no-layers-message p {
  margin-top: 0.5rem;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.01rem;
  border-radius: 0.25rem;
  cursor: pointer;
  position: relative;
  z-index: 20;
  margin-bottom: 0.01rem;
}

.layer-item:hover {
  background-color: #f3f4f6;
}

.layer-item.active {
  background-color: #e0f2fe;
  border-left: 5px solid #3b82f6 !important;
  font-weight: bold;
  color: #1d4ed8;
}

.layer-item.selected {
  background-color: #dbeafe;
  border-left: 3px solid #3b82f6;
  font-weight: 500;
}

.layer-item.selected:hover {
  background-color: #bfdbfe;
}

.layer-item.dragging {
  opacity: 0.3;
  transform: rotate(1deg) scale(0.95);
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: #f8fafc;
  border: 1px dashed #3b82f6;
  position: relative;
}

.layer-item.drag-over {
  border-top: 3px solid #3b82f6;
  background-color: #eff6ff;
  pointer-events: auto;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Ensure layer items can receive drag events */
.layer-item {
  pointer-events: auto;
  transition: all 0.2s ease;
}

/* Make sure draggable elements work properly */
.layer-item[draggable="true"] {
  -webkit-user-drag: element;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: move;
}

/* Improve drag handle visibility */
.layer-item:hover .drag-handle {
  opacity: 1;
  background-color: #f3f4f6;
}

.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  cursor: -webkit-grab;
  cursor: grab;
  color: #9ca3af;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  margin-right: 0.25rem;
  opacity: 0.7;
  min-width: 20px;
  height: 20px;
}

.drag-handle:hover {
  background-color: #f3f4f6;
  color: #6b7280;
  border-color: #d1d5db;
  transform: scale(1.1);
  opacity: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.drag-handle:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
  background-color: #e5e7eb;
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.layer-item.dragging .drag-handle {
  cursor: -webkit-grabbing;
  cursor: grabbing;
  background-color: #3b82f6;
  color: white;
  opacity: 1;
}

/* Layer type indicators */
.layer-item[data-type="shape"] {
  border-left: 3px solid #3b82f6;
}

.layer-item[data-type="stone"] {
  border-left: 3px solid #10b981;
}

.layer-item[data-type="default"] {
  border-left: 3px solid #6b7280;
}

.visibility-button,
.lock-button {
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem;
  border-radius: 0.125rem;
}

.visibility-button:hover,
.lock-button:hover {
  color: #374151;
  background-color: #e5e7eb;
}

.layer-controls {
  display: flex;
  gap: 0.25rem;
}

.layer-name {
  flex: 1 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layer-actions {
  display: flex;
  gap: 0.25rem;
}

.move-up-button,
.move-down-button,
.delete-button {
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem;
  border-radius: 0.125rem;
}

.move-up-button:hover,
.move-down-button:hover,
.delete-button:hover {
  color: #374151;
  background-color: #e5e7eb;
}

.delete-button:hover {
  color: #ef4444;
}

.layer-context-menu {
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.context-menu-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.context-menu-item:hover {
  background-color: #f3f4f6;
}

.context-menu-item.disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.context-menu-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 0.25rem 0;
}

.context-menu-item.delete:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

/* Make sure the canvas is visible */
.rhinestone-designer {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 60px); /* Subtract header height */
  max-height: calc(100vh - 60px);
  overflow: hidden;
}

.rhinestone-designer .main-content {
  display: flex;
  flex: 1 1;
  overflow: hidden;
  min-height: 0; /* Allow flex item to shrink below content size */
}

.rhinestone-designer .canvas-container {
  flex: 1 1;
  position: relative;
  overflow: hidden;
}

/* If there's a .designer-title class, you can add this to hide it */
.designer-title {
  display: none;
}

/* Add these styles to the existing CSS file */

/* Fill Style Selector */
.fill-style-selector {
  width: 100%;
  margin-bottom: 10px;
}

.fill-style-dropdown {
  position: relative;
  width: 100%;
}

.fill-style-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.fill-style-button:hover {
  background-color: #3a3a3a;
}

.fill-style-icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
}

.fill-style-name {
  flex-grow: 1;
  text-align: left;
}

.fill-style-arrow {
  font-size: 10px;
  margin-left: 8px;
}

.fill-style-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  margin-top: 4px;
  z-index: 10;
  max-height: 300px;
  overflow-y: auto;
}

.fill-style-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  background-color: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s;
}

.fill-style-item:hover {
  background-color: #3a3a3a;
}

.fill-style-item.active {
  background-color: #444;
}

.fill-style-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
}

.fill-style-select:hover {
  border-color: #d1d5db;
}

.fill-style-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Layer Properties Section Styles */
.layers-section-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.layer-properties-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.properties-content {
  flex: 1 1;
  overflow-y: auto;
}

.properties-sections {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.property-section {
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: #ffffff;
}

.property-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0.375rem 0.375rem 0 0;
}

.property-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.fill-options-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.fill-options-toggle:hover {
  background-color: #e5e7eb;
  color: #374151;
}

.fill-options-toggle svg {
  transition: transform 0.2s ease;
}

.property-content {
  padding: 0.75rem;
}

.property-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.property-item:last-child {
  margin-bottom: 0;
}

.property-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.property-value {
  font-size: 0.875rem;
  color: #6b7280;
}

.property-input {
  width: 100%;
  padding: 0.375rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.875rem;
  color: #4b5563;
  transition: border-color 0.2s ease;
}

.property-input:hover {
  border-color: #d1d5db;
}

.property-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.property-select {
  width: 100%;
  padding: 0.375rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.property-select:hover {
  border-color: #d1d5db;
}

.property-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.properties-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
}

.properties-placeholder p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Stone placement buttons styling */
.stone-placement-buttons {
  display: flex;
  gap: 0.5rem;
}

.stone-button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  color: #4b5563;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1 1;
  justify-content: center;
}

.stone-button:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.stone-button.active {
  background-color: #e0f2fe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.toggle-options-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.toggle-options-button:hover {
  background-color: #e5e7eb;
  color: #374151;
}

.fill-options {
  padding: 0.75rem;
  background-color: white;
  border-top: 1px solid #e5e7eb;
}

/* Thin Tools Bar Styles */
.thin-tools-bar {
  width: 3.625rem; /* Increased from 3rem (48px) to 3.625rem (58px) - 10px wider */
  border-left: 1px solid #e5e7eb;
  background-color: white;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 5;
}

.fill-tool-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: white;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fill-tool-button:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fill-tool-button.active {
  background-color: #e0f2fe;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Fill Options Popup */
.fill-options-popup {
  position: absolute;
  top: 0;
  right: calc(100% + 0.5rem);
  width: 320px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  z-index: 50;
  animation: slideIn 0.2s ease;
}

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

.popup-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
  border-radius: 0.5rem 0.5rem 0 0;
}

.popup-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
}

.current-selection {
  font-size: 0.875rem;
  color: #6b7280;
}

.current-selection strong {
  color: #1d4ed8;
}

/* Fill Options Grid */
.fill-options-grid {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 0.5rem;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.fill-option-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.fill-option-button:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fill-option-button.selected {
  background-color: #e0f2fe;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  background-color: #f3f4f6;
  color: #6b7280;
  flex-shrink: 0;
}

.fill-option-button.selected .option-icon {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.option-info {
  flex: 1 1;
}

.option-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.125rem;
}

.fill-option-button.selected .option-name {
  color: #1d4ed8;
}

.option-description {
  font-size: 0.75rem;
  color: #6b7280;
}

.fill-option-button.selected .option-description {
  color: #3b82f6;
}

/* Spacing Control */
.spacing-control {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
  border-radius: 0 0 0.5rem 0.5rem;
}

.spacing-control label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.spacing-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.875rem;
  color: #4b5563;
  transition: border-color 0.2s ease;
}

.spacing-input:hover {
  border-color: #d1d5db;
}

.spacing-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Stone Group Property Controls */
.property-control {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.25rem;
}

.property-select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.75rem;
  color: #374151;
  cursor: pointer;
}

.property-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.property-spacing-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.property-range {
  flex: 1 1;
  height: 1.25rem;
  background: #e5e7eb;
  border-radius: 0.25rem;
  outline: none;
  cursor: pointer;
}

.property-range::-webkit-slider-thumb {
  -webkit-appearance: none;
          appearance: none;
  width: 1rem;
  height: 1rem;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
}

.property-range::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.property-number {
  width: 3rem;
  padding: 0.125rem 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  text-align: center;
}

.property-number:focus {
  outline: none;
  border-color: #3b82f6;
}

.property-unit {
  font-size: 0.75rem;
  color: #6b7280;
  min-width: 1.5rem;
}

.property-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.property-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.property-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.property-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.property-label {
  color: #6b7280;
  font-weight: 500;
}

.property-value {
  color: #374151;
  font-weight: 400;
}

.property-section {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: #f9fafb;
}

.property-section + .property-section {
  margin-top: 0.75rem;
}

/* Update main content layout to accommodate accordion panel */
.main-content {
  display: flex;
  flex: 1 1;
  overflow: hidden;
}

/* Right sidebar layout - horizontal arrangement */
.right-sidebar {
  display: flex;
  flex-direction: row;
  border-left: 1px solid #e5e7eb;
  background-color: white;
}

/* AI Button Styles */
.ai-prompt-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.5rem;
}

.ai-prompt-button:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.ai-rhinestone-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.5rem;
}

.ai-rhinestone-button:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Add some spacing between AI buttons */
.ai-prompt-button + .ai-rhinestone-button {
  margin-top: 0.5rem;
}

/* Ensure tooltips appear above everything */
[data-radix-popper-content-wrapper] {
  z-index: 9999 !important;
}

/* Feature gate tooltip positioning */
.feature-gate-tooltip {
  z-index: 9999 !important;
  max-width: 200px !important;
}

/* Stone Group Controls */
.stone-group-section {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  flex: 1 1;
  overflow-y: auto;
}

/* Resizable divider */
.layers-divider {
  height: 8px;
  background: #d1d5db;
  cursor: row-resize;
  position: relative;
  border-top: 1px solid #9ca3af;
  border-bottom: 1px solid #9ca3af;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layers-divider:hover {
  background: #3b82f6;
}

.layers-divider::before {
  content: "⋯";
  color: #6b7280;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
}

.layers-divider:hover::before {
  color: white;
}

.stone-fill-buttons {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 0 4px;
  flex-wrap: nowrap;
}

.stone-fill-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 10px;
  text-align: center;
  min-height: 42px;
  min-width: 40px;
  flex: 1 1 auto;
  max-width: 50px;
}

.stone-fill-button:hover {
  border-color: #007bff;
  background: #f8f9ff;
  transform: translateY(-1px);
}

.stone-fill-button.active {
  border-color: #007bff;
  background: #007bff;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.stone-fill-icon {
  font-size: 14px;
  margin-bottom: 1px;
}

.stone-fill-label {
  font-weight: 500;
  line-height: 1.1;
  font-size: 9px;
}

.stone-spacing-section {
  border-top: 1px solid #e9ecef;
  padding-top: 12px;
}

.spacing-header {
  font-size: 12px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
}

.stone-spacing-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stone-spacing-range {
  flex: 1 1;
  height: 4px;
  background: #e9ecef;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.stone-spacing-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
}

.stone-spacing-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.stone-spacing-number {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

.stone-spacing-number:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Outline Options Styles */
.outline-options-section {
  margin-top: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.outline-layers-section,
.outline-scattered-section {
  margin-bottom: 15px;
}

.outline-layers-section:last-child,
.outline-scattered-section:last-child {
  margin-bottom: 0;
}

.outline-layers-section h4,
.outline-scattered-section h4 {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.outline-layers-grid,
.scattered-levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 6px;
  gap: 6px;
}

.outline-layer-button,
.scattered-level-button {
  padding: 6px 8px;
  border: 1px solid #dee2e6;
  background-color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #495057;
  text-align: center;
  transition: all 0.15s ease;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.outline-layer-button:hover,
.scattered-level-button:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

.outline-layer-button.active,
.scattered-level-button.active {
  background-color: #007bff;
  border-color: #007bff;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.25);
}

.outline-layer-button.active:hover,
.scattered-level-button.active:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-1px);
}

/* Outline Control Styles (Increment/Decrement) */
.outline-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.outline-control-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dee2e6;
  background-color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  transition: all 0.15s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.outline-control-button:hover:not(:disabled) {
  background-color: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

.outline-control-button:active:not(:disabled) {
  transform: translateY(0);
  background-color: #dee2e6;
}

.outline-control-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f8f9fa;
  color: #adb5bd;
}

.outline-control-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  text-align: center;
}

/* Footer Styles */
.footer {
  height: 30px;
  min-height: 30px;
  background-color: #f8f9fa;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 10;
  margin-top: auto;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 1rem;
}

.footer-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Responsive footer text for smaller screens */
@media (max-width: 768px) {
  .footer-text {
    font-size: 0.7rem;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }
}

/* Layer Panel Checkbox Styles */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  font-size: 14px;
}

.section-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.layer-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin-right: 8px;
}

.layer-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #f0f0f0;
  min-height: 2rem;
}

.layer-item.selected {
  background-color: #e3f2fd;
}

.layer-content {
  display: flex;
  align-items: center;
  flex: 1 1;
  gap: 8px;
}

.color-indicator {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}

.layer-name {
  flex: 1 1;
  font-size: 13px;
  color: #333;
}

/* Global Controls */
.global-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.global-control-button {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.global-control-button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.global-control-button.delete {
  color: #dc3545;
}

.global-control-button.delete:hover {
  background: #f8d7da;
  border-color: #f5c6cb;
}

.selected-count {
  font-size: 12px;
  color: #6c757d;
  margin-left: 4px;
  font-weight: 500;
}

/*!****************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[3]!./styles/stone-options-panel.css ***!
  \****************************************************************************************************************************************************************************************************************************************************************************/
/* Stone Options Panel Styles */

/* Make the panel slimmer */
.stone-options-panel {
  width: 200px !important; /* Reduced from 220px (25% reduction) */
  overflow-y: auto;
}

/* Stone Placement Buttons */
.stone-placement-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stone-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.375rem;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
  background-color: white;
  color: #4b5563;
  transition: all 0.2s ease;
  flex: 1 1;
  font-size: 0.7rem;
}

.stone-button:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.stone-button.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.stone-button.active:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.stone-button.ai-prompt-button {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  color: white;
  border: 1px solid #8b5cf6;
  transition: all 0.2s ease;
}

.stone-button.ai-prompt-button:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.stone-button.ai-prompt-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

/* Fill Options Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-options-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
  background: none;
  border: none;
  color: #6b7280;
}

.toggle-options-button:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.rotate-90 {
  transform: rotate(90deg);
}

.fill-options {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #f9fafb;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
}

.fill-style-selector {
  margin-bottom: 0.5rem;
}

.fill-style-selector label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.fill-style-select {
  width: 100%;
  padding: 0.25rem 0.375rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.7rem;
  color: #4b5563;
}

.stone-spacing-control {
  display: flex;
  flex-direction: column;
}

.stone-spacing-control label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.stone-spacing-input {
  padding: 0.25rem 0.375rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: white;
  font-size: 0.7rem;
  color: #4b5563;
}

/* Make stone color boxes smaller */
.color-grid-item {
  padding: 0.25rem;
}

.color-name {
  font-size: 0.65rem;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Adjust size grid items */
.size-grid-item {
  padding: 0.25rem;
  font-size: 0.7rem;
}

/* Adjust section titles */
.section-title {
  font-size: 0.8rem;
}

/* Adjust panel header */
.panel-header {
  padding-bottom: 0.375rem;
}

.panel-title {
  font-size: 0.9rem;
}

/* Adjust fill options */
.fill-options {
  padding: 0.375rem;
}

/* Adjust stone counter */
.stone-counter-cell {
  padding: 0.375rem;
}

.stone-counter-size {
  font-size: 0.65rem;
}

.stone-counter-value {
  font-size: 0.9rem;
}

.stone-counter-total {
  padding: 0.375rem;
  font-size: 0.75rem;
}

/* Disabled state for stone coloring mode */
.panel-section.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.size-grid-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.size-grid-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

