/**
 * plugnmeet-public-modern.css — "Modern" room page preset.
 *
 * Bolder styling for the room page (login form + recordings),
 * fully scoped under .pnm-container so it never leaks into the theme.
 * Colors are driven by CSS variables that can be overridden inline
 * from the plugin settings (see public/class-plugnmeet-public.php).
 */

.pnm-container {
	--pnm-primary: #2271b1;
	--pnm-secondary: #f0f0f1;
	--pnm-text: #1d2327;
	--pnm-border: #c3c4c7;
	--pnm-radius: 8px;
}

/* --- Login form: vertical layout, card container with primary accent --- */

.pnm-container .plugnmeet-login-form {
	display: block;
	background: #fff;
	border: 1px solid var(--pnm-border);
	border-top: 4px solid var(--pnm-primary);
	border-radius: var(--pnm-radius);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	padding: 2em;
	max-width: 440px;
	color: var(--pnm-text);
}

/* VERTICAL form: one field per row, labels above inputs */
.pnm-container .plugnmeet-login-form .form-row {
	display: block;
	margin-bottom: 1.2em;
}

.pnm-container .plugnmeet-login-form .form-row label {
	display: block;
	font-weight: 700;
	font-size: 1.05em;
	margin-bottom: 0.4em;
}

.pnm-container .plugnmeet-login-form .form-row input {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font: inherit;
	line-height: 1.5;
	padding: 0.65em 0.8em;
	border: 1px solid var(--pnm-border);
	border-radius: var(--pnm-radius);
	background: #fff;
	color: inherit;
}

.pnm-container .plugnmeet-login-form .form-row input:focus {
	border-color: var(--pnm-primary);
	outline: 3px solid color-mix(in srgb, var(--pnm-primary) 30%, transparent);
	outline-offset: -1px;
}

/* --- Join button: primary fill, full width --- */

.pnm-container .plugnmeet-login-form .button.button-primary {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	min-height: 0;
	height: auto;
	background: var(--pnm-primary);
	border: 1px solid var(--pnm-primary);
	border-radius: var(--pnm-radius);
	color: #fff;
	cursor: pointer;
	padding: 0.7em 1.2em;
	margin-top: 0.5em;
	font: inherit;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.pnm-container .plugnmeet-login-form .button.button-primary:hover {
	background: var(--pnm-primary);
	filter: brightness(0.88);
}

.pnm-container .plugnmeet-login-form .button.button-primary:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--pnm-primary) 40%, transparent);
	outline-offset: 2px;
}

/* --- Room status notices --- */

.pnm-container .roomStatus.notice {
	margin: 0 0 1.2em 0;
	padding: 0.8em 1.1em;
	border-left-width: 4px;
	border-radius: var(--pnm-radius);
	font: inherit;
}

.pnm-container .roomStatus.notice-info {
	border-left-color: var(--pnm-primary);
	background: color-mix(in srgb, var(--pnm-primary) 6%, #fff);
	color: var(--pnm-text);
}

.pnm-container .roomStatus.notice-success {
	border-left-color: #00a32a;
	background: #edfaef;
	color: var(--pnm-text);
}

.pnm-container .roomStatus.notice-danger {
	border-left-color: #d63638;
	background: #fcf0f1;
	color: var(--pnm-text);
}

/* --- Recordings: primary-colored header, striped rows --- */

.pnm-container .pnm-recordings-wrapper {
	margin-top: 1.2em;
	color: var(--pnm-text);
}

.pnm-container .pnm-recordings-wrapper table.widefat {
	border-spacing: 0;
	box-sizing: border-box;
	border-radius: var(--pnm-radius);
}

.pnm-container .pnm-recordings-wrapper table.widefat th {
	background: var(--pnm-primary);
	color: #fff;
	text-align: left;
	padding: 0.75em 1em;
	border: 1px solid var(--pnm-primary);
	font-weight: 700;
}

.pnm-container .pnm-recordings-wrapper table.widefat td {
	padding: 0.7em 1em;
	border: 1px solid var(--pnm-border);
	vertical-align: middle;
}

.pnm-container .pnm-recordings-wrapper table.widefat tbody tr:nth-child(even) {
	background: color-mix(in srgb, var(--pnm-secondary) 60%, #fff);
}

.pnm-container .pnm-recordings-wrapper table.widefat td:last-child {
	white-space: nowrap;
}

.pnm-container .pnm-recordings-wrapper .button {
	cursor: pointer;
	border-radius: var(--pnm-radius);
	margin-right: 0.4em;
}

/* --- Recordings buttons: explicit compact design ---
 *
 * Themes style .button unpredictably (background, color, min-height,
 * height, padding, font-size). Every property a theme might set is
 * declared explicitly here and both bg + color are always set together,
 * so the button text can never disappear (e.g., under Twenty Twenty).
 */

/* Pagination Pre/Next container: aligned to the right below the table.
   The JS clears the inline display (style.display = ''), so flex is safe
   and the inline margin-top remnant matches the stylesheet value. */
.pnm-container .pnm-recordings-wrapper .pagination-links {
	display: flex;
	justify-content: flex-end;
	gap: 0.5em;
	margin-top: 1em;
}

/* Pagination Pre/Next <button>s: primary-tinted pill with dark text —
   explicit background AND color for every state. */
.pnm-container .pnm-recordings-wrapper .pagination-links .button {
	display: inline-block;
	padding: 6px 14px;
	font-size: 14px;
	line-height: 1.4;
	min-height: 0;
	height: auto;
	background: color-mix(in srgb, var(--pnm-primary) 6%, #fff);
	color: #1d2327;
	border: 1px solid color-mix(in srgb, var(--pnm-primary) 30%, var(--pnm-border));
	border-radius: var(--pnm-radius);
	text-decoration: none;
	cursor: pointer;
	margin: 0;
}

.pnm-container .pnm-recordings-wrapper .pagination-links .button:hover {
	background: color-mix(in srgb, var(--pnm-primary) 14%, #fff);
	color: var(--pnm-primary);
	border-color: var(--pnm-primary);
}

.pnm-container .pnm-recordings-wrapper .pagination-links .button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--pnm-primary) 40%, transparent);
	outline-offset: 2px;
}

/* Play/Download/Delete links (<a class="button button-small" ...>) inside
   the table rows: compact inline anchors with explicit bg + color so
   theme-wide .button rules can't blow them up. */
.pnm-container .pnm-recordings-wrapper .widefat a.button {
	display: inline-block;
	padding: 4px 10px;
	font-size: 13px;
	line-height: 1.4;
	min-height: 0;
	height: auto;
	background: color-mix(in srgb, var(--pnm-primary) 16%, #fff);
	color: var(--pnm-primary);
	border: 1px solid color-mix(in srgb, var(--pnm-primary) 40%, #fff);
	border-radius: var(--pnm-radius);
	text-decoration: none;
	cursor: pointer;
	margin: 0;
}

.pnm-container .pnm-recordings-wrapper .widefat a.button.button-small {
	padding: 3px 8px;
	font-size: 12px;
	min-height: 0;
	height: auto;
}

.pnm-container .pnm-recordings-wrapper .widefat a.button:hover,
.pnm-container .pnm-recordings-wrapper .widefat a.button:focus {
	background: color-mix(in srgb, var(--pnm-primary) 24%, #fff);
	color: var(--pnm-primary);
	border-color: color-mix(in srgb, var(--pnm-primary) 50%, #fff);
	text-decoration: none;
}

.pnm-container .pnm-recordings-wrapper .widefat a.button.delete-recording {
	background: color-mix(in srgb, #d63638 12%, #fff);
	color: #d63638;
	border-color: color-mix(in srgb, #d63638 40%, #fff);
}

.pnm-container .pnm-recordings-wrapper .widefat a.button.delete-recording:hover,
.pnm-container .pnm-recordings-wrapper .widefat a.button.delete-recording:focus {
	background: color-mix(in srgb, #d63638 20%, #fff);
	color: #d63638;
	border-color: color-mix(in srgb, #d63638 50%, #fff);
}

.pnm-container .pnm-recordings-wrapper .widefat a.button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--pnm-primary) 40%, transparent);
	outline-offset: 2px;
}

/* --- Playback modal (hidden by default; styled for when JS shows it) --- */

/* #playbackModal stays hidden until the recordings script shows it in a
   thickbox window; only restyle the video sizing responsively. */
.pnm-container #playbackModal #modalPlayer {
	display: block;
	width: 100%;
	max-width: 960px;
	height: auto;
	margin: auto;
	border-radius: var(--pnm-radius);
	background: #000;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Keep description text spacing sane */
.pnm-container .description {
	margin-top: 0.25em;
}

/* --- Small screens --- */

@media (max-width: 782px) {
	.pnm-container .plugnmeet-login-form {
		padding: 1.25em;
	}

	.pnm-container .pnm-recordings-wrapper table.widefat td:last-child {
		white-space: normal;
	}
}
