/* PS Builder — Front-end Styles */

.ps-builder-card {
	padding: 22px;
}

/* ── Platform Tabs ── */

#ps-builder-tabs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(9,30,66,.08);
	margin: 20px auto;
	max-width: 1000px;
	overflow: hidden;
}

.ps-tab {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 18px 12px;
	border: none;
	background: #fff;
	color: #000;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	transition: background .15s, color .15s;
}

.ps-tab:hover {
	background: #f3f4f6;
}

.ps-tab.is-active {
	background: #1a3cff;
	color: #fff;
}

/* ── Form Card ── */

#ps-builder-form {
	background: #fff;
	border-radius: 10px;
	padding: 40px;
	box-shadow: 0 6px 20px rgba(9,30,66,.08);
	margin: 40px auto;
	max-width: 1000px;
}

#ps-builder-form h2 {
	font-family: "Gotham Black", Sans-serif;
	font-size: 40px !important;
	font-weight: 800 !important;
	text-align: center;
	margin: 20px 0 !important;
	line-height: 1.4;
}

.ps-muted {
	font-family: "AkkuratLLWeb", Sans-serif;
	font-size: 18px;
	font-weight: 300;
	color: #7c8797;
	text-align: center;
	margin-bottom: 40px;
}

.ps-field-wrap {
	margin-bottom: 20px;
}

.ps-label {
	display: block;
	font-weight: 600;
	margin: .25rem 0 .35rem;
}

.ps-required {
	color: #b00020;
	margin-left: 2px;
}

.ps-input {
	width: 100%;
	padding: .7rem;
	border: 1px solid #d9e4f4;
	border-radius: 10px;
	background: #eef0f5;
	color: #000 !important;
	font-size: 15px;
	box-sizing: border-box;
	transition: border-color .15s;
}

.ps-input:focus {
	outline: none;
	border-color: #1a3cff;
	background: #fff;
}

.ps-input.ps-invalid {
	border-color: #b00020;
	background: #ffebee;
}

/* ── Dropzone ── */

.ps-dropzone {
	border: 2px dashed #c5cad7;
	border-radius: 10px;
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
	background: #eef0f5;
	gap: 12px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.ps-dropzone:hover,
.ps-dropzone.ps-drag-over {
	border-color: #1a3cff;
	background: #eff3ff;
}

.ps-dropzone.ps-invalid {
	border-color: #b00020;
	background: #ffebee;
}

.ps-preview {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	object-fit: cover;
	border: 2px solid #e5e7eb;
	display: none;
	flex-shrink: 0;
}

.ps-preview.has-image {
	display: block;
	border-color: #1a3cff;
}

.ps-drop-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

/* ── Buttons ── */

.ps-btn {
	padding: .75rem 1.1rem;
	border-radius: 10px;
	border: 1px solid #d6dae5;
	background: #fff;
	cursor: pointer;
	color: #000;
	font-weight: 400;
	font-size: 15px;
	transition: background .15s, border-color .15s;
	white-space: nowrap;
}

.ps-btn:hover {
	background: #f3f4f6;
}

.ps-btn.primary {
	background: #1a3cff;
	border-color: #1a3cff;
	color: #fff;
}

.ps-btn.primary:hover {
	background: #1430db;
}

.ps-btn:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.ps-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ── Canvas Wrap ── */

.ps-canvas-wrap {
	display: none;
	background: #fff;
	padding: 40px;
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(9,30,66,.08);
	max-width: 1000px;
	margin: 40px auto;
}

.ps-canvas-wrap.is-visible {
	display: block;
}

#psb-canvas {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid #eee;
	border-radius: 10px;
	background: #fff;
}

/* ── Custom Mode Toggle (overlay on canvas) ── */

.ps-style-toggle {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	max-width: calc(100% - 20px);
}

#psb-custom-toggle {
	padding: 6px 14px;
	border-radius: 6px;
	border: none;
	background: rgba(255,255,255,.85);
	color: #000;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, color .15s;
	backdrop-filter: blur(4px);
}

#psb-custom-toggle.is-active {
	background: #1a3cff;
	color: #fff;
}

#psb-swatches {
	display: flex;
	gap: 7px;
	flex-wrap: wrap;
	padding: 5px 8px;
	background: rgba(255,255,255,.85);
	border-radius: 6px;
	backdrop-filter: blur(4px);
}

.psb-swatch {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2.5px solid transparent;
	cursor: pointer;
	transition: transform .15s, border-color .15s;
	padding: 0;
}

.psb-swatch:hover {
	transform: scale(1.2);
}

.psb-swatch.is-active {
	border-color: #fff;
	box-shadow: 0 0 0 2px #1a3cff;
}

/* ── Actions row ── */

.ps-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 15px;
}

/* ── Share platforms row ── */

.ps-share-platforms {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #eee;
}

.ps-share-label {
	font-size: 13px;
	font-weight: 600;
	color: #7c8797;
}

.ps-share-btn {
	font-size: 13px;
	padding: .5rem .9rem;
}

/* ── Caption area ── */

.ps-caption-area {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.ps-actions-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

#psb-caption {
	min-height: 110px;
	resize: vertical;
}

/* ── Hashtags ── */

.ps-hashtags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 8px;
}

.ps-tag {
	background: #eef0f5;
	border: 1px solid #d2d8e8;
	color: #000;
	border-radius: 999px;
	padding: 2px 10px;
	cursor: pointer;
	font-size: 14px;
	transition: background .15s;
}

.ps-tag:hover {
	background: #dde0ea;
}

/* ── Error ── */

.ps-error {
	color: #b00020;
	background: #ffebee;
	border: 1px solid #ffcdd2;
	border-radius: 8px;
	padding: 10px 14px;
	margin-top: 14px;
	font-size: 14px;
}

/* ── Builder Grid Shortcode ── */

.psb-grid {
	display: grid;
	grid-template-columns: repeat(var(--psb-cols,3), 1fr);
	gap: 24px;
}

@media (max-width: 900px) { .psb-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .psb-grid { grid-template-columns: 1fr; } }

.psb-grid-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(0,0,0,.08);
	transition: transform .2s, box-shadow .2s;
	background: #fff;
	color: inherit;
}

.psb-grid-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 28px rgba(0,0,0,.13);
}

.psb-grid-card-img {
	position: relative;
	overflow: hidden;
	background: #1a1a2e;
	line-height: 0;
}

.psb-grid-canvas {
	width: 100%;
	height: auto;
	display: block;
}

.psb-grid-swatches {
	position: absolute;
	bottom: 10px;
	right: 10px;
	display: flex;
	gap: 6px;
}

.psb-grid-swatch {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.8);
	display: block;
}

.psb-grid-card-body {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.psb-grid-card-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: #111827;
}

.psb-grid-card-desc {
	margin: 0;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}

.psb-grid-platforms {
	font-size: 12px;
	color: #9ca3af;
	font-weight: 600;
}

.psb-grid-empty {
	color: #9ca3af;
	font-style: italic;
	text-align: center;
	padding: 40px 0;
}

/* ── Responsive ── */

@media (max-width: 767px) {
	#ps-builder-tabs {
		display: flex;
		overflow-x: auto;
		scrollbar-width: none;
	}
	#ps-builder-tabs::-webkit-scrollbar { display: none; }
	.ps-tab { min-width: 110px; }
	#ps-builder-form { padding: 24px; }
	.ps-canvas-wrap { padding: 20px; }
	#ps-builder-form h2 { font-size: 28px !important; }
}
