/**
 * Password Protect Master — Template Builder Styles
 *
 * @package PasswordProtectMaster
 */

#wpfooter {
	display: none !important;
}

/* ===== Builder Layout ===== */
.ppmstr-builder-wrap {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 32px); /* Full height minus WP admin bar */
	background: #F0F2F5;
	margin: 0;
	width: 100%;
	overflow: hidden;
}

/* Mobile Admin Bar Adjustments */
@media screen and (max-width: 782px) {
	.ppmstr-builder-wrap {
		height: calc(100vh - 46px);
	}
}

/* ===== Top Bar ===== */
.ppmstr-builder-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	height: 56px;
	background: #FFFFFF;
	border-bottom: 1px solid #E4E6EF;
	flex-shrink: 0;
	z-index: 10;
}

.ppmstr-builder-topbar-left,
.ppmstr-builder-topbar-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ppmstr-builder-back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	color: #6C7293;
	text-decoration: none;
	transition: all 0.2s;
}

.ppmstr-builder-back:hover {
	background: #F0F2F5;
	color: #1A1A2E;
}

.ppmstr-builder-name-input {
	border: none;
	font-size: 16px;
	font-weight: 600;
	color: #1A1A2E;
	background: transparent;
	outline: none;
	padding: 6px 12px;
	border-radius: 6px;
	min-width: 200px;
	transition: all 0.2s;
}

.ppmstr-builder-name-input:hover,
.ppmstr-builder-name-input:focus {
	background: #F0F2F5;
}

.ppmstr-builder-name-input::placeholder {
	color: #A0A5B8;
}

.ppmstr-builder-status {
	font-size: 12px;
	color: #00B894;
	font-weight: 500;
}

/* ===== Body ===== */
.ppmstr-builder-body {
	display: flex;
	flex: 1;
	overflow: hidden;
}

/* ===== Sidebars ===== */
.ppmstr-builder-sidebar {
	width: 260px;
	min-width: 260px;
	background: #FFFFFF;
	border-right: 1px solid #E4E6EF;
	overflow-y: auto;
	padding: 16px;
}

.ppmstr-builder-inspector {
	border-right: none;
	border-left: 1px solid #E4E6EF;
}

.ppmstr-builder-sidebar-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #A0A5B8;
	margin: 0 0 12px;
	padding: 0;
}

/* ===== Block Palette Items ===== */
.ppmstr-block-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid #E4E6EF;
	border-radius: 8px;
	margin-bottom: 6px;
	cursor: grab;
	font-size: 13px;
	font-weight: 500;
	color: #1A1A2E;
	transition: all 0.2s;
	user-select: none;
	background: #FAFBFC;
}

.ppmstr-block-item:hover {
	border-color: #6C5CE7;
	background: rgba(108, 92, 231, 0.04);
	transform: translateX(2px);
}

.ppmstr-block-item:active {
	cursor: grabbing;
	opacity: 0.7;
}

.ppmstr-block-item svg {
	flex-shrink: 0;
	color: #6C7293;
}

.ppmstr-block-item span:first-of-type {
	flex: 1;
}

.ppmstr-block-badge {
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	background: rgba(108, 92, 231, 0.1);
	color: #6C5CE7;
	padding: 2px 6px;
	border-radius: 4px;
}

.ppmstr-block-item--required {
	border-color: rgba(108, 92, 231, 0.2);
	background: rgba(108, 92, 231, 0.03);
}

/* ===== Global Styles ===== */
.ppmstr-gs-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 12.5px;
}

.ppmstr-gs-row label {
	color: #1A1A2E;
	font-weight: 500;
	flex-shrink: 0;
}

.ppmstr-gs-row input[type="color"] {
	width: 28px;
	height: 24px;
	border: 2px solid #E4E6EF;
	border-radius: 4px;
	padding: 0;
	cursor: pointer;
}

.ppmstr-gs-row input[type="range"] {
	flex: 1;
	max-width: 80px;
	accent-color: #6C5CE7;
}

.ppmstr-gs-val {
	font-size: 11px;
	color: #6C7293;
	min-width: 32px;
	text-align: right;
	font-weight: 600;
}

.ppmstr-gs-url-input {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #E4E6EF;
	border-radius: 6px;
	font-size: 12px;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.ppmstr-gs-url-input:focus {
	border-color: #6C5CE7;
}

/* ===== Canvas ===== */
.ppmstr-builder-canvas-wrap {
	flex: 1;
	overflow: auto;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 32px 20px;
}

.ppmstr-builder-canvas {
	width: 100%;
	max-width: 820px;
}

.ppmstr-builder-canvas-bg {
	background: #F0F2F8;
	border-radius: 0;
	padding: 60px 32px;
	min-height: 500px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	transition: all 0.3s;
	background-size: cover;
	background-position: center;
	box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

/* ===== Canvas Zones ===== */
.ppmstr-canvas-zone {
	width: 100%;
	max-width: 460px;
	min-height: 20px;
	position: relative; /* stay above absolute-positioned animation elements */
}

.ppmstr-zone-placeholder {
	text-align: center;
	font-size: 11px;
	color: #A0A5B8;
	padding: 10px 16px;
	border: 1px dashed #C8CBDA;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.25);
	transition: all 0.2s;
}

.ppmstr-canvas-zone:hover .ppmstr-zone-placeholder {
	border-color: #6C5CE7;
	color: #6C5CE7;
	background: rgba(108, 92, 231, 0.04);
}

/* ===== Card ===== */
.ppmstr-builder-card {
	background: #FFFFFF;
	border-radius: 16px;
	padding: 40px;
	width: 100%;
	max-width: 420px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
	text-align: center;
	transition: all 0.3s;
	min-height: 100px;
	cursor: pointer;
	position: relative;
}

.ppmstr-builder-card.ppmstr-card--selected {
	outline: 2px solid #6C5CE7;
	outline-offset: 4px;
}

.ppmstr-builder-card.ppmstr-card--selected::after {
	content: 'Card';
	position: absolute;
	top: -22px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #FFF;
	background: #6C5CE7;
	padding: 2px 8px;
	border-radius: 4px;
}

.ppmstr-builder-empty {
	padding: 40px 20px;
	text-align: center;
	color: #A0A5B8;
}

.ppmstr-builder-empty p {
	margin: 12px 0 0;
	font-size: 13px;
}

/* ===== Canvas Blocks ===== */
.ppmstr-cb {
	position: relative;
	padding: 8px;
	margin: 4px -8px;
	border: 2px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s;
}

.ppmstr-cb:hover {
	border-color: rgba(108, 92, 231, 0.2);
	background: rgba(108, 92, 231, 0.02);
}

.ppmstr-cb.ppmstr-cb--selected {
	border-color: #6C5CE7;
	background: rgba(108, 92, 231, 0.04);
}

.ppmstr-cb-toolbar {
	display: none;
	position: absolute;
	top: -14px;
	right: 4px;
	gap: 2px;
	z-index: 5;
}

.ppmstr-cb:hover .ppmstr-cb-toolbar,
.ppmstr-cb.ppmstr-cb--selected .ppmstr-cb-toolbar {
	display: flex;
}

.ppmstr-cb-tool {
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #FFFFFF;
	border: 1px solid #E4E6EF;
	border-radius: 4px;
	cursor: pointer;
	color: #6C7293;
	font-size: 14px;
	transition: all 0.15s;
	padding: 0;
}

.ppmstr-cb-tool:hover {
	border-color: #6C5CE7;
	color: #6C5CE7;
}

.ppmstr-cb-tool--delete:hover {
	border-color: #E17055;
	color: #E17055;
	background: rgba(225, 112, 85, 0.05);
}

/* ===== Drop Indicator ===== */
.ppmstr-drop-indicator {
	height: 3px;
	background: #6C5CE7;
	border-radius: 2px;
	margin: 2px 0;
	animation: ppmstr-pulse 1s ease infinite;
}

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

/* Block preview content: non-interactive so clicks bubble to block wrapper */
.ppmstr-cb-content {
	pointer-events: none;
}

.ppmstr-cb-content input,
.ppmstr-cb-content button,
.ppmstr-cb-content textarea,
.ppmstr-cb-content select {
	pointer-events: none;
}

/* ===== Inspector Fields ===== */
.ppmstr-insp-group {
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid #F0F2F5;
}

.ppmstr-insp-group:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.ppmstr-insp-label {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	color: #6C7293;
	margin-bottom: 5px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.ppmstr-insp-section-title {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #A0A5B8;
	margin: 16px 0 8px;
	padding-top: 8px;
	border-top: 1px solid #E4E6EF;
}

.ppmstr-insp-section-title:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.ppmstr-insp-input {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #E4E6EF;
	border-radius: 6px;
	font-size: 13px;
	outline: none;
	box-sizing: border-box;
	font-family: inherit;
	transition: border-color 0.2s;
}

.ppmstr-insp-input:focus {
	border-color: #6C5CE7;
}

.ppmstr-insp-color {
	width: 32px;
	height: 26px;
	border: 2px solid #E4E6EF;
	border-radius: 4px;
	padding: 0;
	cursor: pointer;
}

.ppmstr-insp-range-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ppmstr-insp-range {
	flex: 1;
	accent-color: #6C5CE7;
}

.ppmstr-insp-range-val {
	font-size: 11px;
	font-weight: 600;
	color: #6C7293;
	min-width: 30px;
	text-align: right;
}

.ppmstr-insp-divider {
	height: 1px;
	background: #E4E6EF;
	margin: 16px 0 12px;
}

/* ===== Icon Select ===== */
.ppmstr-icon-select {
	display: flex;
	gap: 6px;
}

.ppmstr-icon-btn {
	padding: 8px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
}

.ppmstr-icon-btn:hover {
	opacity: 0.85;
}

/* ===== Template Card Actions (Template Listing Page) ===== */
.ppmstr-tpl-actions {
	display: flex;
	gap: 6px;
	padding: 8px 12px 12px;
	flex-wrap: wrap;
}

.ppmstr-btn--xs {
	padding: 5px 10px;
	font-size: 11.5px;
	border-radius: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
	.ppmstr-builder-sidebar { width: 220px; min-width: 220px; }
}

@media (max-width: 900px) {
	.ppmstr-builder-body { flex-direction: column; }
	.ppmstr-builder-sidebar { width: 100%; min-width: 100%; border: none; border-bottom: 1px solid #E4E6EF; }
	.ppmstr-builder-inspector { border-top: 1px solid #E4E6EF; }
}
