/* Custom styles for smartboard app */

.canvas-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.selection-box {
  position: absolute;
  border: 2px dashed #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
  pointer-events: none;
  z-index: 10;
}

.block {
  position: absolute;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  min-width: 20px;
  min-height: 20px;
}

.block:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.block.selected {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
  transform: scale(1.02);
}

.page-item {
  transition: all 0.2s ease;
}

.page-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tool-btn.active {
  background-color: rgb(219 234 254);
  color: rgb(37 99 235);
}

/* Block Toolbar Styles */
#blockToolbar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
  animation: fadeInUp 0.2s ease-out;
}

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

.quick-action-btn {
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background-color: #f3f4f6;
  transform: scale(1.05);
}

.quick-action-btn:active {
  transform: scale(0.95);
}

/* Block Type Selection */
.block-type-btn {
  transition: all 0.2s ease;
}

.block-type-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Modal Enhancements */
.modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

/* Form Styling */
input[type="color"] {
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

/* Loading spinner */
.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Notification Styles */
.notification {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .canvas-container {
    max-width: 100%;
    overflow-x: auto;
  }

  .block {
    min-width: 30px;
    min-height: 30px;
  }

  #blockToolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    top: auto !important;
    left: auto !important;
  }

  .modal-content {
    margin: 10px;
    max-width: calc(100vw - 20px);
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  #blockToolbar {
    display: none !important;
  }
}

/* Accessibility */
.block:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.quick-action-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .block {
    border-color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
  }

  #blockToolbar {
    background-color: rgba(31, 41, 55, 0.95);
    border-color: #374151;
  }
}

/* Blok Info Butonu ve Göstergeler */
.block {
  position: relative;
}

.info-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background-color: #4f46e5;
  color: white;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  opacity: 1; /* Her zaman görünür */
  transition: all 0.2s ease;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.info-btn:hover {
  background-color: #3730a3;
  transform: scale(1.15);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Hover efektini kaldır - artık gerek yok */
/* .block:hover .info-btn {
  opacity: 1;
} */

/* Zengin İçerik Göstergeleri - daha büyük */
.content-indicators {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: flex;
  gap: 3px;
  z-index: 10;
}

.content-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.indicator-image {
  background-color: #ec4899;
}

.indicator-video {
  background-color: #ef4444;
}

.indicator-link {
  background-color: #3b82f6;
}

.indicator-note {
  background-color: #eab308;
}

.indicator-test {
  background-color: #a855f7;
}

/* Modal Geliştirmeleri */
#blockDetailsModal .modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Blok Hover Efektleri */
.block:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #4f46e5;
}

/* Responsive Modal */
@media (max-width: 768px) {
  #blockDetailsModal .relative {
    margin: 10px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .grid-cols-1.lg\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
}
