/**
 * PartyMem3 customer-facing styles (dashboard, guest page).
 * Enqueue when shortcode is present; filemtime for cache-busting.
 */

.pm3-dashboard {
	max-width: 960px;
	margin: 0 auto;
}

.pm3-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.pm3-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.25rem;
}

.pm3-credits {
	margin: 0;
	font-size: 1rem;
}

.pm3-notice {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-radius: 4px;
	border-left: 4px solid #00a32a;
}

.pm3-notice-error {
	border-left-color: #d63638;
}

.pm3-notice-success {
	border-left-color: #00a32a;
}

.pm3-new-page-password p {
	margin: 0.25rem 0;
}

.pm3-new-zip-pin p {
	margin: 0.25rem 0;
}

.pm3-zip-link-url {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.35rem 0.5rem;
	margin-top: 0.25rem;
	font-size: 0.9rem;
}

.pm3-guest-zip-links {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e0e0e0;
}

.pm3-guest-zip-links .pm3-subtitle {
	margin: 0 0 0.5rem 0;
	font-size: 1rem;
}

.pm3-create-zip-link {
	margin-bottom: 0.75rem;
}

.pm3-create-zip-link .small-input,
.pm3-zip-link-item .small-input {
	width: 4rem;
	margin-right: 0.25rem;
}

.pm3-zip-links-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pm3-zip-link-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #eee;
	font-size: 0.9rem;
}

.pm3-zip-link-item:last-child {
	border-bottom: none;
}

.pm3-zip-link-token {
	font-family: monospace;
}

.pm3-zip-link-status {
	font-style: italic;
	color: #50575e;
}

.pm3-pages-list {
	margin-bottom: 1.5rem;
}

.pm3-page-card {
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 1rem;
	margin-bottom: 1rem;
	background: #fff;
}

.pm3-page-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pm3-page-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.1rem;
}

.pm3-ttl-chip {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	border-radius: 3px;
	font-size: 0.85rem;
}

.pm3-ttl-ok { background: #d4edda; color: #155724; }
.pm3-ttl-pending { background: #fff3cd; color: #856404; }
.pm3-ttl-expired { background: #f8d7da; color: #721c24; }

.pm3-page-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.5rem 0;
	font-size: 0.9rem;
	color: #50575e;
}

.pm3-usage-bar {
	position: relative;
	height: 1.25rem;
	background: #f0f0f1;
	border-radius: 3px;
	margin: 0.5rem 0;
	overflow: hidden;
}

.pm3-usage-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: #2271b1;
	transition: width 0.2s ease;
}

.pm3-usage-label {
	position: relative;
	z-index: 1;
	display: inline-block;
	padding: 0 0.25rem;
	font-size: 0.8rem;
	line-height: 1.25rem;
}

.pm3-page-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: 0.75rem;
}

.pm3-page-actions .pm3-link,
.pm3-page-actions .pm3-link-button {
	margin-right: 0.5rem;
}

.pm3-form-inline {
	display: inline;
}

.pm3-form-inline select {
	margin-right: 0.25rem;
}

.pm3-sep {
	margin: 1.5rem 0;
	border: none;
	border-top: 1px solid #c3c4c7;
}

.pm3-create-form p {
	margin-bottom: 0.75rem;
}

.pm3-create-form label {
	display: block;
	margin-bottom: 0.25rem;
}

.pm3-cost-hint {
	font-size: 0.9rem;
	color: #50575e;
}

.pm3-purge-form {
	margin-bottom: 1rem;
}

.pm3-denied,
.pm3-error {
	color: #721c24;
	padding: 0.5rem 0;
}

.pm3-delete-form button.pm3-delete {
	color: #b32d2e;
}

/* Guest page */
.pm3-guest-page {
	max-width: 960px;
	margin: 0 auto;
}

.pm3-guest-gate .pm3-guest-password-form {
	margin-top: 1rem;
}

.pm3-guest-password-form label {
	display: block;
	margin-bottom: 0.25rem;
}

.pm3-guest-password-form input[type="password"] {
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
}

.pm3-guest-error {
	color: #721c24;
}

.pm3-guest-gallery .pm3-guest-title {
	margin-bottom: 0.75rem;
}

.pm3-guest-upload-form {
	margin-bottom: 1rem;
}

.pm3-add-photo-label {
	display: inline-block;
	cursor: pointer;
}

.pm3-add-photo-btn {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: #2271b1;
	color: #fff;
	border-radius: 4px;
}

.pm3-add-photo-label input[type="file"] {
	position: absolute;
	width: 0.1px;
	height: 0.1px;
	opacity: 0;
	overflow: hidden;
	z-index: -1;
}

.pm3-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.75rem;
}

.pm3-gallery-item {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 4px;
	background: #f0f0f1;
}

.pm3-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pm3-pending-badge {
	position: absolute;
	top: 4px;
	left: 4px;
	background: rgba(0,0,0,0.7);
	color: #fff;
	font-size: 0.75rem;
	padding: 2px 6px;
	border-radius: 3px;
}

.pm3-moderation-actions {
	position: absolute;
	bottom: 4px;
	left: 4px;
	right: 4px;
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.pm3-moderation-actions .pm3-form-inline {
	display: inline;
}

.pm3-lightbox-trigger {
	display: block;
	height: 100%;
}

.pm3-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.9);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

.pm3-lightbox[hidden] {
	display: none !important;
}

.pm3-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.pm3-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 2rem;
	cursor: pointer;
	line-height: 1;
	padding: 0.25rem;
}

.pm3-lightbox-prev,
.pm3-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.2);
	border: none;
	color: #fff;
	font-size: 2rem;
	cursor: pointer;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
}

.pm3-lightbox-prev { left: 1rem; }
.pm3-lightbox-next { right: 1rem; }

@media (max-width: 640px) {
	.pm3-add-photo-btn {
		position: fixed;
		bottom: 1rem;
		right: 1rem;
		z-index: 1000;
		box-shadow: 0 2px 8px rgba(0,0,0,0.3);
	}
}

/* QR page */
.pm3-qr-page {
	max-width: 560px;
	margin: 0 auto;
}

.pm3-qr-gate .pm3-qr-password-form {
	margin-top: 1rem;
}

.pm3-qr-password-form label {
	display: block;
	margin-bottom: 0.25rem;
}

.pm3-qr-password-form input[type="password"] {
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
}

.pm3-qr-error {
	color: #721c24;
}

.pm3-qr-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.pm3-qr-dashboard-link {
	margin-left: auto;
}

.pm3-qr-content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.pm3-qr-share-title {
	margin: 0 0 0.25rem 0;
	font-size: 1.1rem;
}

.pm3-qr-share-desc {
	margin: 0;
	font-size: 0.95rem;
	color: #50575e;
}

.pm3-qr-image {
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pm3-qr-image img,
.pm3-qr-image canvas,
.pm3-qr-image table {
	display: block;
}

.pm3-qr-link-preview label {
	display: block;
	margin-bottom: 0.25rem;
}

.pm3-qr-link-input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.pm3-qr-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Dashboard gate (login / request account) */
.pm3-dashboard-gate {
	max-width: 480px;
	margin: 2rem auto;
	text-align: center;
}

.pm3-gate-title {
	margin-bottom: 0.5rem;
	font-size: 1.5rem;
}

.pm3-gate-message {
	margin-bottom: 1rem;
}

/* Standalone login links block [pm3_login_links] */
.pm3-login-links-block {
	max-width: 480px;
	margin: 2rem auto;
	text-align: center;
}

.pm3-login-links-title {
	margin-bottom: 0.5rem;
	font-size: 1.5rem;
}

.pm3-login-links-desc {
	margin-bottom: 1rem;
	color: #50575e;
}

/* Guest page: invalid link error (no password form) */
.pm3-guest-error .pm3-guest-error-message {
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.pm3-guest-error .pm3-guest-error-desc {
	margin-bottom: 1rem;
	color: #50575e;
}

.pm3-guest-error .pm3-guest-gate-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pm3-gate-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.pm3-guest-gate-links {
	margin-top: 1rem;
	font-size: 0.95rem;
}

/* Request account form */
.pm3-request-account {
	max-width: 480px;
	margin: 2rem auto;
}

.pm3-request-account-title {
	margin-bottom: 0.5rem;
}

.pm3-request-account-desc {
	margin-bottom: 1rem;
	color: #50575e;
}

.pm3-request-account-form label {
	display: block;
	margin-bottom: 0.25rem;
}

.pm3-request-account-form input[type="text"],
.pm3-request-account-form input[type="email"],
.pm3-request-account-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-bottom: 0.5rem;
}

.pm3-request-account-login {
	margin-top: 1rem;
	font-size: 0.95rem;
}

/* Account page */
.pm3-account-page {
	max-width: 480px;
	margin: 0 auto;
}

.pm3-account-title {
	margin-bottom: 1rem;
}

.pm3-account-form p {
	margin-bottom: 1rem;
}

.pm3-account-form label {
	display: block;
	margin-bottom: 0.25rem;
}

.pm3-account-form .description {
	display: block;
	font-size: 0.9em;
	color: #50575e;
	margin-top: 0.25rem;
}
