/* Right panel */
#right-panel {
	background: var(--surface);
	border-left: 1px solid var(--border);
	overflow-y: auto;
	padding: 24px;
	width: 360px;
	box-shadow: var(--shadow-sm);
}

/* Panel header */
.panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.panel-header h2 {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--text);
	margin: 0;
}

.reset-btn {
	background: var(--surface-hover);
	color: var(--text-muted);
	border: 1px solid var(--border);
	width: 40px;
	height: 40px;
	border-radius: var(--radius);
	cursor: pointer;
	transition: var(--transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.reset-btn:hover {
	background: var(--primary-light);
	color: var(--primary);
	transform: rotate(-180deg);
}

/* Tabs */
.panel-tabs {
	display: flex;
	border-bottom: 1px solid var(--border);
	margin-bottom: 20px;
}

.tab {
	flex: 1;
	padding: 12px;
	background: transparent;
	border: none;
	font-weight: 600;
	cursor: pointer;
	color: var(--text-secondary);
	transition: var(--transition);
	position: relative;
}

.tab:hover {
	color: var(--text);
	background: var(--surface-hover);
}

.tab.active {
	color: var(--primary);
	background: var(--primary-light);
}

.tab.active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--primary);
	border-radius: 3px 3px 0 0;
}

/* Search */
.search-props {
	margin-bottom: 24px;
}

.prop-search {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-hover);
	color: var(--text);
	font-size: 0.95rem;
	transition: var(--transition);
}

.prop-search:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.15);
}

/* Accordions */
.prop-group.accordion {
	margin-bottom: 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface);
}

.group-header {
	padding: 14px 16px;
	background: var(--surface-hover);
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	color: var(--text);
	transition: background 0.2s;
}

.group-header:hover {
	background: var(--primary-light);
}

.group-header i {
	transition: transform 0.3s ease;
	color: var(--text-muted);
}

.group-header.expanded i {
	transform: rotate(180deg);
}

.group-content {
	display: none;
	padding: 16px;
}

.prop-group.expanded .group-content {
	display: block;
}

/* Properties */
.prop-row,
.field-row {
	margin-bottom: 20px;
}

.prop-row label,
.field-row label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.9rem;
	color: var(--text-secondary);
	font-weight: 500;
}

.page-add-inline {
	display: flex;
	gap: 8px;
	align-items: center;
}
.page-add-inline input {
	flex: 1;
	min-width: 0;
}
.page-add-inline .btn {
	flex-shrink: 0;
}

.prop-row input[type="text"],
.prop-row input[type="url"],
.prop-row input[type="color"],
.prop-row select,
.prop-row textarea,
.prop-row input[type="range"],
.field-row input[type="text"],
.field-row input[type="url"],
.field-row input[type="color"],
.field-row select,
.field-row textarea,
.field-row input[type="range"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-hover);
	color: var(--text);
	font-size: 0.95rem;
	transition: var(--transition);
}

.prop-row input:focus,
.prop-row select:focus,
.prop-row textarea:focus,
.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.15);
}

/* Color preview swatch */
.color-preview {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	display: inline-block;
	vertical-align: middle;
	margin-right: 12px;
	border: 1px solid var(--border);
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Visibility toggle */
.visibility-toggle {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.visibility-toggle label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9rem;
	color: var(--text-secondary);
}

/* Action buttons — visible when a block is selected */
.actions-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	background: var(--surface-hover);
}

.actions-row .btn {
	background-color: #5b21b6;
	flex: 1;
	min-width: 110px;
	padding: 10px 16px;
	font-size: 0.9rem;
	border-radius: var(--radius);
	transition: var(--transition);
	color: #fff;
}

.actions-row .btn-danger.delete-block {
	min-width: 120px;
	flex: 1 1 auto;
}

.btn-danger {
	background: #ef4444;
	color: white;
	border: none;
}

.btn-danger,.btn,.btn-secondary:hover {
	transform: translateY(-1px);
}

.btn-primary {
	background: var(--primary);
	color: white;
	border: none;
}



/* Responsive */
@media (max-width: 1200px) {
	#right-panel {
		width: 320px;
	}
}

@media (max-width: 992px) {
	#right-panel {
		width: 100%;
		height: auto;
		position: relative;
		border-left: none;
		border-top: 1px solid var(--border);
	}

	.actions-row .btn {
		flex: 1 1 45%;
	}
}





.array-editor,
.field-array {
  margin: 16px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.array-editor label,
.field-array label {
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.items-list {
  margin-bottom: 12px;
}

.array-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  align-items: flex-end;
}

.array-item .field {
  flex: 1;
  min-width: 120px;
}

.array-item input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.remove-item {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.remove-item:hover {
  background: #dc2626;
}

.add-item {
  background: #5b21b6;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

.add-item:hover {
  background: #4c1d95;
}

.save-menu {
  background: #10b981;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 12px;
  width: 100%;
}

.save-menu:hover {
  background: #059669;
}

/* Array editor (menu, casinos, social links) */
.array-editor,
.field-array {
  flex-direction: column;
  align-items: stretch;
}
.array-editor > label,
.field-array > label {
  margin-bottom: 8px;
}
.array-editor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  max-height: 280px;
  overflow-y: auto;
}
.array-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.array-item-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.array-item-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.array-item-field label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.array-item-field input {
  padding: 6px 10px;
  font-size: 0.9rem;
}
.array-item input[type="url"],
.array-item input[type="text"] {
  width: 100%;
}
.btn-array-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-array-remove:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.btn-array-add {
  margin-top: 4px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Image upload */
.image-upload-preview {
  width: 100%;
  height: 80px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.image-upload-label {
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin-bottom: 8px;
}
.image-upload-label .image-upload-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.image-upload-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  pointer-events: none;
}
.image-upload-label:hover .image-upload-text {
  opacity: 0.9;
}
.image-upload-input {
  margin-bottom: 8px;
}
.btn-remove-image {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn-remove-image:hover {
  background: #fee2e2;
}