/**
 * AirView Block Styles
 * Used in both editor and frontend
 */

/* Block container */
.ir-airview-block {
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid #1d567a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin: 20px 0;
}

/* Placeholder when no panorama selected */
.ir-airview-block-placeholder {
  padding: 60px 20px;
  text-align: center;
  background: #f9f9f9;
  border: 2px dashed #ccc;
  border-radius: 8px;
  color: #666;
  font-size: 16px;
  margin: 20px 0;
}

/* Loading state */
.ir-airview-block-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  font-size: 16px;
  border-radius: 8px;
  min-height: 400px;
}

/* Error state */
.ir-airview-block-error {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff3f3;
  border: 2px solid #dc3232;
  color: #dc3232;
  font-size: 16px;
  border-radius: 8px;
  padding: 20px;
  min-height: 400px;
}

/* Preview in editor */
.ir-airview-block-preview {
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  min-height: 400px;
}

/* Popup styles (reused from main airview.css) */
.ir-airview-popup {
  width: 260px;
  background: #fff;
  color: #111;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  padding: 10px 10px 12px 10px;
  position: relative;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
}

.ir-airview-popup__title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 14px;
  color: #111;
}

.ir-airview-popup__body {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #333;
}

.ir-airview-popup__actions {
  display: flex;
  justify-content: center;
}

.ir-airview-popup__btn {
  display: inline-block;
  background: #fff;
  color: #042a6c;
  text-decoration: none !important;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 3px solid #2d9bff;
  padding: 5px 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ir-airview-popup__btn:hover {
  background: #2d9bff;
  color: #fff;
}

/* Popup tip (pointer) */
.ir-airview-popup__tip {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.18);
}

/* Editor-specific styles */
.block-editor-block-list__block .ir-airview-block {
  margin: 0;
}

/* Ensure Photo Sphere Viewer panels have proper styling */
.psv-panel-menu-title,
.psv-panel-menu-item-label {
  color: white !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ir-airview-block {
    border-width: 2px;
  }

  .ir-airview-popup {
    width: 220px;
  }

  .ir-airview-popup__title {
    font-size: 13px;
  }

  .ir-airview-popup__body {
    font-size: 12px;
  }
}
