/* Custom styles for react-grid-layout */
.react-grid-layout {
  position: relative;
}

.react-grid-item {
  transition: all 200ms ease;
  transition-property: left, top, width, height;
}

.react-grid-item.cssTransforms {
  transition-property: transform, width, height;
}

.react-grid-item.resizing {
  transition: none;
  z-index: 1;
  will-change: width, height;
}

.react-grid-item.react-draggable-dragging {
  transition: none;
  z-index: 3;
  will-change: transform;
}

.react-grid-item.dropping {
  visibility: hidden;
}

.react-grid-item.react-grid-placeholder {
  background: rgb(59, 130, 246, 0.15);
  opacity: 1;
  transition-duration: 100ms;
  z-index: 2;
  border-radius: 0.5rem;
  border: 2px dashed rgb(59, 130, 246);
}

/* Improve click responsiveness */
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Allow interaction with modal iframes */
.modal-iframe {
  pointer-events: auto !important;
}

/* Better focus states */
input:focus,
button:focus {
  outline: none;
}

/* Smooth scrolling */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* Resizing handle styles */
.react-resizable-handle {
  position: absolute;
  width: 20px;
  height: 20px;
  bottom: 0;
  right: 0;
  cursor: se-resize;
}

.react-resizable-handle::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}

/* Dragging visual feedback */
.react-grid-item.react-draggable-dragging {
  opacity: 0.8;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
}