/*Standalone styles for affiliate.html (the page does not load the site stylesheet)*/
*{
	box-sizing: border-box;
}
html,
body{
	margin: 0;
}
body{
	min-height: 100vh;
	background-color: #000000;
	color: #ffffff;
	font-family: 'Roboto', 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
	-webkit-font-smoothing: antialiased;
}

/*header*/
.aff-header{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.aff-header h1{
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
}
.aff-back,
.aff-logout{
	color: rgba(255, 255, 255, 0.75);
	font-size: 13px;
	text-decoration: none;
	transition: color 0.2s ease-in-out;
}
.aff-back:hover,
.aff-logout:hover{
	color: #e1666a;
}

/*layout*/
.aff-main{
	max-width: 760px;
	margin: 0 auto;
	padding: 24px 20px 64px;
}
.aff-card{
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	background-color: rgba(255, 255, 255, 0.03);
}
.aff-card h2{
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
}
.aff-hint{
	margin: 0 0 14px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 13px;
	line-height: 1.5;
}
.aff-link-row{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.aff-link{
	flex: 1 1 260px;
	min-width: 0;
	padding: 11px 13px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 9px;
	background-color: rgba(255, 255, 255, 0.06);
	color: #ffffff;
	font-family: inherit;
	font-size: 14px;
}
.aff-link:focus{
	outline: none;
	border-color: #e1666a;
}

/*buttons*/
.aff-btn{
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: 9px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}
.aff-btn-primary{
	background-color: #e1666a;
	border-color: #e1666a;
	color: #ffffff;
}
.aff-btn-primary:hover{
	background-color: #cf5560;
	border-color: #cf5560;
}
.aff-btn-ghost{
	background-color: transparent;
	border-color: rgba(255, 255, 255, 0.28);
	color: #ffffff;
}
.aff-btn-ghost:hover{
	border-color: #ffffff;
}

/*collapsible Setup area*/
.aff-setup{
	margin-top: 14px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	background-color: rgba(255, 255, 255, 0.03);
	overflow: hidden;
}
.aff-setup-toggle{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 16px 18px;
	border: 0;
	background-color: transparent;
	color: #ffffff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out;
}
.aff-setup-toggle:hover{
	background-color: rgba(255, 255, 255, 0.04);
}
.aff-setup-chevron{
	color: rgba(255, 255, 255, 0.6);
	transition: transform 0.25s ease-in-out;
}
.aff-setup-toggle[aria-expanded="true"] .aff-setup-chevron{
	transform: rotate(180deg);
}
.aff-setup-panel{
	padding: 0 18px 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.aff-setup-panel .aff-hint{
	margin: 14px 0 0;
}
/*one full-width row per source*/
.aff-sources{
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 14px;
}
.aff-source{
	display: block;
	padding: 10px 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	background-color: rgba(255, 255, 255, 0.02);
}
.aff-source-main{
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}
.aff-source-name{
	flex: 0 0 104px;
	color: rgba(255, 255, 255, 0.65);
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.aff-source-field{
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background-color: rgba(255, 255, 255, 0.06);
}
.aff-source-field:focus-within{
	border-color: #e1666a;
}
/*the input's own text is transparent; the layer behind it draws the coloured copy*/
.aff-source-input{
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 0;
	background-color: transparent;
	color: transparent;
	caret-color: #ffffff;
	font-family: inherit;
	font-size: 14px;
}
.aff-source-input::placeholder{
	color: rgba(255, 255, 255, 0.38);
}
.aff-source-input:focus{
	outline: none;
}
.aff-source-highlight{
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	padding: 0 12px;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.9);
	font-family: inherit;
	font-size: 14px;
	white-space: pre;
	pointer-events: none;
}
.aff-source-highlight b{
	color: #7ee2a8;
	font-weight: inherit;
}
/*the Save button keeps to the right edge of the row*/
.aff-source-main .aff-btn{
	flex: 0 0 auto;
	margin-left: auto;
}
/*status line under the input; hidden until there is something to say*/
.aff-source-note{
	display: block;
	margin: 6px 0 0 114px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
}
.aff-source-note:empty{
	display: none;
}
.aff-source-note.is-saved{
	color: #7ee2a8;
}
.aff-source-note.is-error{
	color: #ff7a90;
}
.aff-howto{
	color: #e1666a;
	text-decoration: none;
}
.aff-howto:hover{
	text-decoration: underline;
}

/*myhome.html*/
.my-section{
	margin-top: 14px;
}
.my-facts{
	display: grid;
	grid-template-columns: 130px 1fr;
	gap: 8px 12px;
	margin: 12px 0 0;
}
.my-facts dt{
	color: rgba(255, 255, 255, 0.55);
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.my-facts dd{
	margin: 0;
	color: #ffffff;
	font-size: 14px;
	word-break: break-all;
}
.my-soon{
	margin: 10px 0 0;
	color: rgba(255, 255, 255, 0.55);
	font-size: 14px;
	font-style: italic;
}
/*affiliate setup status: two compact columns of name + icon*/
.my-sources{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 20px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}
.my-sources li{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 0;
	color: #ffffff;
	font-size: 13px;
}
.my-source-icon{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	color: rgba(255, 255, 255, 0.35);
	visibility: hidden;			/*shown once the status is known*/
}
.my-source-icon.is-ready,
.my-source-icon.is-no{
	visibility: visible;
}
.my-source-icon svg{
	display: block;
	width: 16px;
	height: 16px;
}
.my-source-icon .icon-ok{
	display: none;
}
.my-source-icon.is-ready{
	color: #7ee2a8;
}
.my-source-icon.is-ready .icon-ok{
	display: block;
}
.my-source-icon.is-ready .icon-no{
	display: none;
}
.my-actions{
	margin-top: 14px;
}
a.aff-btn{
	display: inline-block;
	text-decoration: none;
}

/*howto.html*/
.howto-main{
	max-width: 760px;
	margin: 0 auto;
	padding: 24px 20px 64px;
}
.howto-section{
	margin-top: 18px;
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	background-color: rgba(255, 255, 255, 0.03);
}
.howto-section h2{
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 700;
}
.howto-section p{
	margin: 0 0 12px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	line-height: 1.6;
}
.howto-section a{
	color: #e1666a;
	text-decoration: none;
}
.howto-section a:hover{
	text-decoration: underline;
}
.howto-example{
	display: block;
	margin: 0 0 14px;
	padding: 10px 12px;
	border-radius: 9px;
	background-color: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.85);
	font-family: Consolas, Menlo, monospace;
	font-size: 12px;
	line-height: 1.5;
	word-break: break-all;
}
.howto-shot{
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
}

/*counters*/
.aff-stats{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 14px;
}
.aff-stat{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 18px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	background-color: rgba(255, 255, 255, 0.03);
}
.aff-stat-label{
	color: rgba(255, 255, 255, 0.6);
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.aff-stat-value{
	font-size: 30px;
	line-height: 1.1;
}

/*scrollable detail list*/
.aff-details{
	margin-top: 14px;
	padding: 18px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	background-color: rgba(255, 255, 255, 0.03);
}
.aff-details-head{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}
.aff-details-head h2{
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}
.aff-details-list{
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 340px;
	padding-right: 4px;
	overflow-y: auto;
}
.aff-row{
	padding: 10px 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.75);
}
.aff-row time{
	display: block;
	margin-bottom: 4px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 12px;
}
.aff-empty{
	margin: 0;
	padding: 8px 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 13px;
}
.aff-error{
	min-height: 18px;
	margin: 14px 0 0;
	color: #ff7a90;
	font-size: 13px;
}

@media (max-width: 560px){
	.aff-stats{
		grid-template-columns: 1fr;
	}
	.my-sources{
		grid-template-columns: 1fr;
	}
	.aff-source-main{
		flex-wrap: wrap;
	}
	.aff-source-name{
		flex-basis: 100%;
	}
	.aff-source-note{
		margin-left: 0;
	}
}
