/**
 * Cockpit-Adminstile (Portrait-Archiv Photostore).
 * Nur fuer die Plugin-eigenen Adminseiten; nutzt bewusst WordPress-Admin-Optik.
 */

/* Zahlenspalten in den Cockpit-Tabellen rechtsbuendig ausrichten. */
.pawps-pricelist .pawps-num { text-align: right; }
.pawps-pricelist input.small-text { text-align: right; }

/* Etwas Luft zwischen den Sektionen (Artikel in Liste / hinzufuegbar). */
.pawps-pricelist { margin-bottom: 0.5em; }

/* Kategorie-Zwischenueberschriften: klar abgesetzt, damit die Gruppierung
   nach Artikelkategorie auf einen Blick erkennbar ist. */
.pawps-pricelist .pawps-cat-heading th {
	background: #f0f6fc;
	border-top: 2px solid #c5d9ed;
	color: #1d4b7a;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-top: 0.6em;
	padding-bottom: 0.4em;
}

/* --- Account-/Onboarding-Seite ------------------------------------------- */
.pawps-account__intro { font-size: 14px; max-width: 40em; }

.pawps-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 1em 1.25em;
	margin: 1em 0;
	max-width: 720px;
}

.pawps-card--primary { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1 inset; }
.pawps-card > h2:first-child,
.pawps-card summary + p { margin-top: 0; }
.pawps-card summary { cursor: pointer; font-size: 14px; }
.pawps-account__advanced { background: #f6f7f7; }

.pawps-inline-form .regular-text { max-width: 360px; }

/* Entschlacktes Signup-Formular: Felder im Raster statt Wall-of-Text. */
.pawps-onboard-form .pawps-fieldset {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 0.5em 1em 1em;
	margin: 0 0 1em;
	max-width: 720px;
}

.pawps-onboard-form legend { font-weight: 600; padding: 0 0.4em; }

.pawps-onboard-form .pawps-grid {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 0.75em 1em;
}

.pawps-onboard-form .pawps-field { display: flex; flex-direction: column; }
.pawps-onboard-form .pawps-field label { font-weight: 600; margin-bottom: 0.2em; }
.pawps-onboard-form .pawps-field input { width: 100%; }
.pawps-onboard-form .pawps-field--wide { grid-column: 1 / -1; }
.pawps-onboard-form .pawps-field--narrow { max-width: 8em; }
.pawps-req { color: #d63638; }

/* AGB-Zustimmung: Pflicht-Checkbox, darunter der Datenschutz-Hinweis. */
.pawps-consent {
	max-width: 720px;
	margin: 0 0 1em;
}

.pawps-consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.4em;
	font-weight: 600;
}

.pawps-consent input[type="checkbox"] { margin-top: 0.25em; }
.pawps-consent .description { margin: 0.3em 0 0 1.9em; }

@media ( max-width: 640px ) {
	.pawps-onboard-form .pawps-grid { grid-template-columns: 1fr; }
}

/* --- Staffelpreis-Editor ------------------------------------------------- */
.pawps-staffel { max-width: 560px; }
.pawps-staffel .pawps-base { font-size: 14px; margin: 0 0 1em; }

/* Hilfebox (Staffelpreise UND Produktsets - daher nicht auf .pawps-staffel gescoped). */
.pawps-help {
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
	padding: 0.75em 1em;
	margin: 0 0 1.25em;
	font-size: 13px;
}
.pawps-help h3 { margin: 0 0 0.4em; font-size: 14px; }
.pawps-help p { margin: 0.3em 0; }
.pawps-staffel .pawps-help table.pawps-example {
	margin: 0.6em 0 0;
	border-collapse: collapse;
	width: auto;
}
.pawps-staffel .pawps-help table.pawps-example td {
	padding: 0.1em 1.4em 0.1em 0;
	border: 0;
}

/* Schmale Eingabetabelle statt voller Breite. */
.pawps-staffel table.pawps-staffel-rows { width: auto; min-width: 340px; }
.pawps-staffel table.pawps-staffel-rows th { text-align: left; }
.pawps-staffel table.pawps-staffel-rows .pawps-num { text-align: left; }
.pawps-staffel table.pawps-staffel-rows input.small-text { text-align: right; width: 6em; }

/* --- Bild-Upload: Fortschritt + Erfolg ----------------------------------- */
.pawps-upload-progress { max-width: 520px; margin: 1em 0; }
.pawps-upload-progress__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 0.35em;
}
.pawps-upload-progress__label { font-weight: 600; }
.pawps-upload-progress__count { color: #50575e; font-variant-numeric: tabular-nums; }

.pawps-upload-bar {
	height: 12px;
	background: #e2e4e7;
	border-radius: 6px;
	overflow: hidden;
}
.pawps-upload-bar__fill {
	height: 100%;
	width: 0;
	background: #2271b1;
	border-radius: 6px;
	transition: width 0.15s ease;
}
.pawps-upload-progress__file {
	margin-top: 0.35em;
	font-size: 12px;
	color: #50575e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pawps-upload-success {
	display: flex;
	align-items: center;
	gap: 0.75em;
	max-width: 520px;
	margin: 1em 0;
	padding: 1em 1.25em;
	border: 1px solid #46b450;
	border-left: 4px solid #46b450;
	border-radius: 6px;
	background: #f0fbf1;
}
.pawps-upload-success--partial {
	border-color: #dba617;
	border-left-color: #dba617;
	background: #fcf9e8;
}
.pawps-upload-success__icon {
	flex: 0 0 auto;
	width: 2em;
	height: 2em;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #46b450;
	color: #fff;
	font-weight: 700;
	font-size: 1.1em;
}
.pawps-upload-success--partial .pawps-upload-success__icon { background: #dba617; }
.pawps-upload-success__title { display: block; font-size: 15px; }
.pawps-upload-success__body { color: #50575e; margin-top: 0.15em; }

.pawps-upload-consent { max-width: 640px; }
.pawps-upload-consent label { display: flex; gap: 0.5em; align-items: flex-start; }

/* Produktset-Badge in der Preislisten-Uebersicht */
.pawps-setbadge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 10px;
	background: #e6f0fa;
	color: #1d4b7a;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.pawps-muted { color: #999; }

/* Badges in der Galerie-Uebersicht (Sichtbarkeit, Bearbeitungszustand).
   .pawps-badge wurde bisher ausgegeben, war aber nie gestylt. */
.pawps-badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 10px;
	background: #f0f0f1;
	color: #3c434a;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
/* Inaktiv */
.pawps-badge--state-0 { background: #f0f0f1; color: #646970; }
/* Passwort-/Code-geschuetzt */
.pawps-badge--state-1,
.pawps-badge--state-5 { background: #fcf3e3; color: #8a6116; }
/* Oeffentlich gelistet */
.pawps-badge--state-2,
.pawps-badge--state-3 { background: #e6f4ea; color: #1e6b34; }

/* Bilder werden erst nach Bestellung bearbeitet */
.pawps-badge--unedited { background: #e6f0fa; color: #1d4b7a; }

/* ---------------------------------------------------------------------------
   Galerie-Statistik (Spalte „Aufrufe“ und Tagesuebersicht).
   Kennzahlen, Verlauf und Tabelle - ohne JavaScript, damit die Zahlen auch
   beim Ausdrucken und mit abgeschaltetem Skript da sind.
   --------------------------------------------------------------------------- */
.pawps-stats-periods { margin: 8px 0 4px; }
.pawps-stats-periods a,
.pawps-stats-periods strong { margin-right: 12px; }

.pawps-stats-tiles {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 16px 0;
}
.pawps-stats-tile {
	flex: 1 1 160px;
	padding: 12px 16px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
}
.pawps-stats-tile__value {
	display: block;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
}
.pawps-stats-tile__label {
	display: block;
	color: #646970;
	font-size: 12px;
}

/* Ein Balken je Tag; die Segmente stapeln von unten (Portrait-Archiv unten,
   eigene Website darueber). Die Zahlen stehen in der Tabelle darunter. */
.pawps-stats-chart {
	display: flex;
	align-items: flex-end;
	gap: 1px;
	height: 140px;
	padding: 8px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
}
.pawps-stats-bar {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	justify-content: flex-end;
	min-width: 2px;
	height: 100%;
}
.pawps-stats-bar__pa,
.pawps-stats-bar__wp,
.pawps-stats-bar__api {
	display: block;
	width: 100%;
}
.pawps-stats-bar__pa { background: #2271b1; }
.pawps-stats-bar__wp { background: #7fb3dd; }
/* Dritter Zugangsweg (angebundene Fremdanwendung). Bewusst ein Grauton und
   nicht die dritte Blaustufe: Er ist fuer den Fotografen eine Randgroesse und
   soll die beiden Wege, die er selbst steuert, nicht optisch verdraengen. */
.pawps-stats-bar__api { background: #c3c4c7; }

.pawps-stats-legend {
	margin: 8px 0 16px;
	color: #646970;
	font-size: 12px;
}
.pawps-stats-legend__key {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 4px;
	border-radius: 2px;
	vertical-align: -1px;
}

.pawps-stats-days { max-width: 720px; }

/* --- Vorschau der Darstellungs-Einstellungen ----------------------------- */

/* Rahmen um die Vorschau. Die Farben/Masse darin kommen aus den
   CSS-Variablen des Shop-Stylesheets (der Container traegt
   `data-pawps-appearance-preview`), damit die Vorschau exakt die
   Frontend-Standardwerte zeigt. */
.pawps-preview {
	max-width: 720px;
	margin: 0 0 12px;
	padding: 16px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
}

/* Bewusste Kopie des Galerie-Rasters aus pawps-shop.css (`#images`): dort
   haengt es an einer ID, die im Cockpit nicht vergeben werden soll. Beide
   Stellen muessen dieselben Variablen benutzen, sonst zeigt die Vorschau
   etwas anderes als die Galerie. */
.pawps-preview__grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( var( --pawps-thumb-min ), 1fr ) );
	align-items: var( --pawps-grid-align );
	gap: var( --pawps-gap );
	margin: 0;
	padding: 0;
	list-style: none;
}

.pawps-preview__grid li {
	margin: 0;
}

.pawps-preview__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 16px 0 0;
}

.pawps-preview__hint {
	margin: 0 0 12px;
	color: #646970;
	font-size: 12px;
}

.pawps-appearance-color {
	width: 64px;
	height: 32px;
	padding: 0;
	vertical-align: middle;
	cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Galerie-Uebersicht: Spaltenbreiten.
   Die Tabelle laeuft als `wp-list-table … fixed`, also sieben gleich breite
   Spalten. Das reichte weder fuer den Titel noch fuer die vier Aktionen, und
   die Sichtbarkeits-Pille (nowrap) schob sich ueber die Aktionen dahinter.
   --------------------------------------------------------------------------- */
/* ALLE sieben Spalten bekommen eine Breite (Summe 100%). Bleibt eine ohne,
   erhaelt sie bei `fixed` nur den Rest - und der fiel auf schmalen Fenstern so
   weit zusammen, dass „Aufrufe (30 Tage)" Buchstabe fuer Buchstabe untereinander
   stand. */
.pawps-gallerytable .pawps-col-title      { width: 24%; }
.pawps-gallerytable .pawps-col-date       { width: 9%; }
.pawps-gallerytable .pawps-col-photos     { width: 6%; }
.pawps-gallerytable .pawps-col-views      { width: 12%; }
.pawps-gallerytable .pawps-col-code       { width: 15%; }
.pawps-gallerytable .pawps-col-visibility { width: 13%; }
.pawps-gallerytable .pawps-col-actions    { width: 21%; }

/* Sicherheitsnetz: In dieser Spalte darf die Pille umbrechen, statt in die
   Nachbarspalte zu laufen - eine laengere Uebersetzung soll das Layout nicht
   wieder aufschieben. */
.pawps-gallerytable .pawps-col-visibility .pawps-badge {
	white-space: normal;
}

/* Die Aktionen bleiben als Gruppe lesbar; einzelne Links brechen nicht mitten
   im Wort um. */
.pawps-gallerytable .pawps-col-actions a {
	white-space: nowrap;
}
