/* saffplayer.css - Saff Mastering approval-page player (ftplist6)
   Colors are set here at the top; adjust to match the site exactly. */

.saffplayer {
	--sp-red:     #700000;   /* brick red */
	--sp-red-dk:  #4a0000;
	--sp-tan:     #d8c3a0;   /* tan */
	--sp-tan-lt:  #f2e9d8;
	--sp-ink:     #1b1b1b;   /* black */
	--sp-paper:   #ffffff;   /* white */

	width: 600px;
	max-width: 94vw;
	box-sizing: border-box;
	margin: 6px 0 4px;
	text-align: left;
	font-family: "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
	font-size: 13px;
	color: var(--sp-ink);
	background: var(--sp-tan-lt);
	border: 2px solid var(--sp-red);
	border-radius: 6px;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
}

/* ---- header */
.sp-head { background: var(--sp-red); color: var(--sp-paper); padding: 9px 14px 8px; }
.sp-title { font-size: 15px; font-weight: bold; text-transform: lowercase; letter-spacing: 0.02em; }
.sp-info { font-size: 11px; opacity: 0.88; margin-top: 2px; }

/* ---- transport */
.sp-transport {
	display: flex; align-items: center; gap: 8px;
	padding: 10px 14px 8px;
}
.sp-btn {
	flex: none; width: 34px; height: 34px; padding: 0;
	border: 0; border-radius: 50%;
	background: transparent; color: var(--sp-red);
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.sp-btn svg { width: 20px; height: 20px; fill: currentColor; }
.sp-btn:hover { background: var(--sp-tan); }
.sp-btn.sp-play { width: 44px; height: 44px; background: var(--sp-red); color: var(--sp-paper); }
.sp-btn.sp-play:hover { background: var(--sp-red-dk); }
.sp-btn.sp-play svg { width: 22px; height: 22px; }
.sp-btn:focus-visible { outline: 2px solid var(--sp-ink); outline-offset: 2px; }

.sp-now { flex: 1; min-width: 0; padding-left: 6px; }
.sp-now-name { font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-now-times, .sp-all-times { font-variant-numeric: tabular-nums; }
.sp-now-times { font-size: 12px; }
.sp-all-times { flex: none; font-size: 12px; color: var(--sp-red-dk); }

/* ---- seek bar */
.sp-bar {
	position: relative; height: 14px;
	margin: 0 14px 10px;
	background: var(--sp-tan);
	border-radius: 3px;
	cursor: pointer;
	touch-action: none;
}
.sp-bar-buf, .sp-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; pointer-events: none; }
.sp-bar-buf { background: rgba(112, 0, 0, 0.18); }
.sp-bar-fill { background: var(--sp-red); }
.sp-bar-marks { position: absolute; inset: 0; pointer-events: none; }
.sp-bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--sp-ink); opacity: 0.55; }
.sp-bar-tip {
	display: none; position: absolute; bottom: 19px;
	transform: translateX(-50%);
	padding: 2px 6px; border-radius: 3px;
	background: var(--sp-ink); color: var(--sp-paper);
	font-size: 11px; white-space: nowrap; pointer-events: none;
	font-variant-numeric: tabular-nums;
}

/* ---- message */
.sp-msg { display: none; margin: 0 14px 10px; padding: 7px 10px; background: #fff3cd; border: 1px solid #e0c36a; border-radius: 4px; font-size: 12px; }

/* ---- track list */
.sp-list { list-style: none; margin: 0; padding: 0 0 6px; background: var(--sp-paper); border-top: 1px solid var(--sp-tan); max-height: 360px; overflow-y: auto; }
.sp-row {
	display: flex; align-items: baseline; gap: 10px;
	padding: 5px 14px;
	cursor: pointer;
	border-bottom: 1px solid var(--sp-tan-lt);
}
.sp-row:hover { background: var(--sp-tan-lt); }
.sp-row-num { flex: none; width: 22px; text-align: right; color: var(--sp-red); font-variant-numeric: tabular-nums; }
.sp-row-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }   /* long names wrap */
.sp-row-dur { flex: none; font-variant-numeric: tabular-nums; color: #555; }
.sp-row.sp-row-head, .sp-row.sp-row-head:hover {
	cursor: default; background: var(--sp-tan-lt);
	padding-top: 4px; padding-bottom: 4px;
	font-size: 11px; color: var(--sp-red-dk); text-transform: lowercase;
	border-bottom: 1px solid var(--sp-tan);
}
.sp-row-head .sp-row-num, .sp-row-head .sp-row-dur { color: var(--sp-red-dk); }
.sp-row-dlhead { flex: none; display: flex; align-items: center; justify-content: center; gap: 1px; }
.sp-row-dlhead { gap: 3px; }
.sp-row-dlhead svg { width: 1.35em; height: 1.35em; fill: currentColor; flex: none; }
.sp-row-dl { flex: none; display: flex; justify-content: center; height: 22px; margin-top: -3px; margin-bottom: -3px; align-items: center; justify-content: center; border-radius: 4px; color: var(--sp-red); }
.sp-row-dl svg { width: 16px; height: 16px; fill: currentColor; }
.sp-row-dl:hover { background: var(--sp-red); color: var(--sp-paper); }
.sp-playing .sp-row.sp-cur .sp-row-dl { color: var(--sp-paper); }
.sp-row.sp-cur { background: var(--sp-tan); font-weight: bold; }
.sp-playing .sp-row.sp-cur { background: var(--sp-red); color: var(--sp-paper); }
.sp-playing .sp-row.sp-cur .sp-row-num,
.sp-playing .sp-row.sp-cur .sp-row-dur { color: var(--sp-paper); }

.sp-empty .sp-transport, .sp-empty .sp-bar { display: none; }


/* ================================================================
   approval page elements around the player (classes from ftplist6)
   ================================================================ */
.dl-box, .note-box, .proj-box, details.files, table.files { --sp-red: #700000; --sp-red-dk: #4a0000; --sp-tan: #d8c3a0; --sp-tan-lt: #f2e9d8; }

/* ---- download buttons, boxed like the player */
.dl-box {
	width: 600px; max-width: 94vw;
	margin: 6px 0 4px;
	padding: 4px 14px;
	text-align: left;
	background: var(--sp-tan-lt);
	border: 2px solid var(--sp-red);
	border-radius: 6px;
	font-family: "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
	box-sizing: border-box;
}
.dl-item { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.dl-item + .dl-item { border-top: 1px solid var(--sp-tan); }
.dl-form { margin: 0; flex: none; }
.dl-btn {
	display: inline-flex; align-items: center; gap: 8px;
	min-width: 230px;
	padding: 10px 16px;
	border: 0; border-radius: 6px;
	background: var(--sp-red); color: #fff;
	font: bold 14px "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
	text-transform: lowercase;
	cursor: pointer;
	box-shadow: 0 2px 0 var(--sp-red-dk);
}
.dl-btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.dl-btn:hover { background: var(--sp-red-dk); }
.dl-btn:active { transform: translateY(1px); box-shadow: none; }
.dl-note { font-size: 12px; color: #333; line-height: 1.35; }

/* ---- note.txt text, boxed like the player and downloads */
.note-box {
	width: 600px; max-width: 94vw; box-sizing: border-box;
	margin: 6px 0 4px; padding: 14px 16px;
	text-align: left; background: var(--sp-tan-lt);
	border: 2px solid var(--sp-red); border-radius: 6px;
	font: 13px/1.5 "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
}
a.dl-btn, a.dl-btn:link, a.dl-btn:visited, a.dl-btn:hover, a.dl-btn:active {
	color: #fff !important; text-decoration: none !important; box-sizing: border-box;
}   /* the site's own link colours would otherwise turn these red on red */
.sp-row-dl, .sp-row-dl:link, .sp-row-dl:visited { color: var(--sp-red) !important; text-decoration: none !important; }
.sp-row-dl:hover, .sp-playing .sp-row.sp-cur .sp-row-dl { color: var(--sp-paper) !important; }
.dl-file { word-break: break-word; color: #555; }

/* ---- project page banner: "contents" in the site's banner style
   (an image, banner-contents.png, is used instead when it exists) */
.pg-banner { margin: 4px 0 2px; line-height: 0; }
.pg-banner img { max-width: 100%; height: auto; }
.pg-banner-text {
	display: inline-block; line-height: 1.2;
	padding: 6px 16px 7px; background: #700000; color: #fff;
	font: 22px "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
	text-transform: lowercase; letter-spacing: 0.02em;
}
h2.pg-after-banner { margin-top: 12px; }
/* section banners (stream... / download... / notes...): a red bar the width of
   the pane, the banner image at its left (its empty right end is simply cut off) */
.pg-pane > .pg-banner { background: #700000; overflow: hidden; margin: 0 0 8px; border-radius: 0; }
.pg-pane > .pg-banner img { max-width: none; display: block; }

/* ---- project page: its subfolders as rows */
.proj-box {
	width: 600px; max-width: 94vw; box-sizing: border-box;
	margin: 6px 0 4px; text-align: left; overflow: hidden;
	background: var(--sp-paper, #fff);
	border: 2px solid var(--sp-red); border-radius: 6px;
	font-family: "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
}
a.proj-row, a.proj-row:link, a.proj-row:visited {
	display: flex; align-items: baseline; gap: 14px;
	padding: 10px 14px; border-bottom: 1px solid var(--sp-tan-lt);
	color: #1b1b1b !important; text-decoration: none !important; background: #fff;
}
a.proj-row:last-child { border-bottom: 0; }
a.proj-row:hover { background: var(--sp-tan-lt); }
.proj-name { flex: 1; min-width: 0; font-weight: bold; font-size: 14px; color: var(--sp-red); word-break: break-word; }
.proj-what { flex: none; font-size: 12px; color: #444; }
.proj-when { flex: none; width: 90px; text-align: right; font-size: 12px; color: #777; font-variant-numeric: tabular-nums; }
.proj-go { flex: none; font-size: 18px; line-height: 1; color: var(--sp-red); }

/* ---- the login form (template 2ndhalfnew6) */
.login-box {
	--sp-red: #700000; --sp-red-dk: #4a0000; --sp-tan: #d8c3a0; --sp-tan-lt: #f2e9d8;
	width: 380px; max-width: 94vw; box-sizing: border-box;
	margin: 12px 0; padding: 16px 18px 18px;
	text-align: left; background: var(--sp-tan-lt);
	border: 2px solid var(--sp-red); border-radius: 6px;
	font-family: "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
}
.login-box h4 { margin: 0 0 10px; text-transform: uppercase; }
.login-pw {
	display: block; width: 100%; box-sizing: border-box;
	padding: 10px 12px; font-size: 16px;            /* 16px+ keeps iPhones from zooming in */
	border: 1px solid #b9a27c; border-radius: 4px; background: #fff;
}
.login-pw:focus { outline: 2px solid var(--sp-red); outline-offset: 1px; }
.login-btn { width: 100%; min-width: 0; justify-content: center; margin-top: 10px; }

/* ---- "return to main project page" */
input.pg-back {
	margin-left: 10px; padding: 4px 10px; vertical-align: middle;
	border: 1px solid var(--sp-red, #700000); border-radius: 4px;
	background: #fff; color: #700000;
	font: 12px "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif;
	cursor: pointer;
}
input.pg-back:hover { background: #700000; color: #fff; }

/* ---- the folder's files: a compact fold-out list */
details.files { width: 600px; max-width: 94vw; margin: 14px 0 4px; text-align: left; font-family: "Century Gothic", CenturyGothic, AppleGothic, "Trebuchet MS", sans-serif; }
details.files summary {
	cursor: pointer; padding: 6px 10px;
	background: var(--sp-tan-lt); color: var(--sp-red-dk);
	border: 1px solid var(--sp-tan); border-radius: 4px;
	font-size: 12px; text-transform: lowercase;
}
details.files[open] summary { border-radius: 4px 4px 0 0; }
table.files { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
details.files table.files { border: 1px solid var(--sp-tan); border-top: 0; }
table.files td { padding: 3px 10px; border-bottom: 1px solid var(--sp-tan-lt); vertical-align: top; }
table.files td.f-name { word-break: break-word; }
table.files td.f-size, table.files td.f-date { white-space: nowrap; color: #666; font-variant-numeric: tabular-nums; }
table.files tr:hover td { background: var(--sp-tan-lt); }


/* ---- wide screens: player on the left, downloads on the right, files full width below.
   The panes share one set of rows (heading / note / box), so the
   player and the download box start at the same height whatever the notes say. */
.pg-note { margin: 0 0 6px; }
.pg-note:empty { margin: 0; }
@media (min-width: 1200px) {
	.pg-panes {
		display: grid;
		grid-template-columns: minmax(0, 600px) minmax(300px, 440px);
		grid-template-rows: auto auto auto auto;
		column-gap: 32px;
	}
	.pg-pane { display: grid; grid-row: 1 / span 3; grid-template-rows: subgrid; align-content: start; }
	.pg-pane > h4 { margin-bottom: 8px; }
	.pg-pane > .saffplayer, .pg-pane > .dl-box { margin-top: 0; }
	.pg-pane > .dl-box { align-self: start; }            /* hugs its buttons; tops still line up */
	.pg-stream .saffplayer, .pg-stream .note-box, .pg-side .dl-box, .pg-panes > details.files { width: auto; max-width: none; }
	.pg-side .dl-item { flex-direction: column; align-items: stretch; gap: 6px; }
	.pg-side .dl-btn { width: 100%; min-width: 0; justify-content: center; }
	.pg-panes > details.files { grid-column: 1 / -1; grid-row: 4; margin-top: 18px; }
}


/* the two right-hand columns: same width and spacing in the heading row and every track row */
.sp-row-dur { width: 52px; text-align: right; }
.sp-row-dl, .sp-row-dlhead { width: 70px; margin-left: 14px; margin-right: -6px; }

/* ---- every page type keeps the logo and content in the same place */
@media (min-width: 701px) {
	table.pg { width: 100%; max-width: 1440px; }
	td.pg-main { text-align: left; }
}

/* ---- touch screens: bigger targets */
@media (pointer: coarse) {
	.sp-btn { width: 42px; height: 42px; }
	.sp-btn.sp-play { width: 52px; height: 52px; }
	.sp-bar { height: 22px; border-radius: 4px; }
	.sp-row { padding: 12px 14px; }
	.sp-list { max-height: none; }
}

/* ---- phones: the approval page itself (table classes come from ftplist6) */
@media (max-width: 700px) {
	body { margin: 8px; -webkit-text-size-adjust: 100%; }
	table.pg, table.pg > tbody, table.pg > tbody > tr, table.pg > tbody > tr > td { display: block; width: auto !important; }
	td.pg-logo { text-align: center; margin-bottom: 8px; }
	td.pg-logo img { max-width: 160px; width: 45%; height: auto; }
	td.pg-main { text-align: left; }
	td.pg-main h2 { font-size: 18px; }
	td.pg-main input[type=submit] { font-size: 15px; padding: 8px 10px; max-width: 100%; white-space: normal; }
	td.pg-main table { width: 100%; }
	td.pg-main td { word-break: break-word; font-size: 13px; vertical-align: top; }
	.saffplayer, .dl-box, .note-box, .proj-box, details.files, .login-box { width: auto; max-width: none; }
	.login-btn { padding: 14px 16px; font-size: 16px; }
	.proj-when { display: none; }
	.dl-item { flex-direction: column; align-items: stretch; gap: 6px; }
	.dl-btn { width: 100%; justify-content: center; }
	table.files td.f-date { display: none; }
	input.pg-back { display: block; margin: 6px 0 0; }
	.sp-transport { padding: 10px 10px 8px; gap: 4px; }
	.sp-bar { margin: 0 10px 10px; }
	.sp-head, .sp-row { padding-left: 10px; padding-right: 10px; }
	.sp-all-times { font-size: 11px; }
}

/* single public file (data-file): no prev/next, no "track 1 of 1" */
.sp-single .sp-prev, .sp-single .sp-next, .sp-single .sp-all-times { display: none; }
.sp-single .sp-row-num { display: none; }
