/*
Theme Name: Steel-Line Order Tracking
Author: Websites That Sell
Author URI: https://www.websitesthatsell.com.au/
Description: A minimalist WordPress theme built for Steel-Line's Order Tracking feature.
Version: 1.0
Text Domain: steelline-order-tracking
*/

:root {
	--primary-color: #009ad7;
	--secondary-color: #455560;
	--tertiary-color: #7d8082;
	--text-color: #455560;
}

html {
	font-family: 'Arial', sans-serif;
}

*, ::after, ::before {
    box-sizing: inherit;
}

body {
    box-sizing: border-box;
    margin: 0;
    background-color: #fdfdfd;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--text-color);
}

header {
    width: 100%;
    margin: 0 auto 60px;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90px;
    background-color: #fff;
    box-shadow: 0 0 5px #0003;
}

.header-logo {
    width: 400px;
	max-width: 100%;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	background-image: url('./assets/logos-icons/BX-Bunka-Brands.png');
}
.header-logo::before {
    content: '';
    display: block;
    padding-top: 32%;
}

header > nav {
    margin-bottom: 10px;
}

main {
	flex: 1;
}

h1,h2,h3,h4,h5,h6 {
	text-align: center;
}

.content {
	max-width: 1220px;
	margin: auto;
	padding: 0 20px;
}

form input,
form input[type=email] {
	padding: 11px 16px;
    border-radius: 4px;
    line-height: 1.4;
    border: 1px solid #777;
}

form input[type='submit'] {
    background-color: var(--primary-color) !important;
    padding: 12px 24px;
    border: none;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
    color: #fff;
    font-weight: 600;
	cursor: pointer;
}

footer {
	width: 100%;
    margin: 30px auto 0;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    background-color: #333;
	color: #fff;
}



/* tracking page */
html {
    font-family: Arial;
}

.primary-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 16px;
    row-gap: 10px;
}

.brand-shape {
    padding: 16px 22px;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.outline {
    border: 1px solid #777;
}

.primary-details > div {
    display: flex;
    gap: 6px;
}
.primary-details ul {
    margin: 0;
    list-style: none;
    padding: 0;
}
.primary-details li:not(:last-child) {
    margin-bottom: 6px;
}

.tracking-timeline {
    display: flex;
    justify-content: space-around;
    text-align: center;
    position: relative;
    margin-top: 54px;
    z-index: 1;
}
.tracking-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 80%;
    height: 6px;
    transform: translateX(-50%);
    border-radius: 5px;
    border: 1px solid #7e7e7e;
    z-index: -3;
}
.tracking-timeline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    height: 6px;
    width: 0%;
    border-radius: 5px;
    background-color: var(--primary-color);
    transition: 1s ease-in-out all;
    z-index: -2;
}

.tracking-timeline:has(.completed:nth-child(1))::after {
    width: 2%;
}
.tracking-timeline:has(.completed:nth-child(2))::after {
    width: 22%;
}
.tracking-timeline:has(.completed:nth-child(3))::after {
    width: 42%;
}
.tracking-timeline:has(.completed:nth-child(4))::after {
    width: 62%;
}
.tracking-timeline:has(.completed:nth-child(5))::after {
    width: 80%;
}

.tracking-stage {
    padding: 36px 10px 10px;
    flex: 1 1 0%;
    position: relative;
}

.stage-icon {
    position: absolute;
    top: 2px;
    left: 50%;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--tertiary-color);
    z-index: -1;
    transition: .5s ease-in-out all;
    transform: translate(-50%, 50%);
    opacity: 0;
}
.stage-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -66%) rotate(-45deg);
    width: 40%;
    height: 24%;
    border-width: 3px;
    border-color: #fff;
    border-bottom-style: solid;
    border-left-style: solid;
}

.tracking-stage.completed .stage-icon {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.stage-label {
    font-size: 20px;
    font-weight: 600;
}

.stage-detail {
    padding-top: 6px;
	min-height: 1.6em;
}

.tracking-note {
    width: fit-content;
    margin: 24px auto;
    padding: 20px 30px;
    border: 4px solid #fff;
    background-image: linear-gradient(90deg, #ececec, #ffffff);
    box-shadow: 0px 0px 21px rgba(0,0,0,0.1);
}

@media(max-width:991px) {
	.tracking-timeline {
		flex-direction: column;
		width: fit-content;
		margin-left: auto;
		margin-right: auto;
	}

	.tracking-stage {
		padding: 18px 40px;
	}

	.tracking-timeline::before {
		left: 0;
		top: 50%;
		transform: translate(0, -50%);
		width: 6px;
		height: calc(100% - 60px);
	}

	.tracking-timeline::after {
		top: 30px;
		left: 0;
		width: 6px !important;
	}
	.tracking-timeline:has(.completed:nth-child(1))::after {
		height: calc(20% - 50px);
	}
	.tracking-timeline:has(.completed:nth-child(2))::after {
		height: calc(40% - 50px);
	}
	.tracking-timeline:has(.completed:nth-child(3))::after {
		height: calc(60% - 50px);
	}
	.tracking-timeline:has(.completed:nth-child(4))::after {
		height: calc(80% - 50px);
	}
	.tracking-timeline:has(.completed:nth-child(5))::after {
		height: calc(100% - 60px);
	}

	.stage-icon {
		left: 2px;
		top: 50%;
	}
}

@media(max-width:767px) {
	.primary-details > div {
		flex-wrap: wrap;
	}
}






/* admin bar adjustments */
body.admin-bar {
	min-height: calc(100vh - 32px);
}




/* DEV / DEBUG */
header nav a {
    color: blue;
}

.cron-link.disabled {
    pointer-events: none;
    color: grey;
    text-decoration: none;
}
.cron-link.running {
	color: orange !important;
}
.spinner {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid #ccc;
	border-top-color: #333;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-left: 5px;
	vertical-align: middle;
}
@keyframes spin {
	to { transform: rotate(360deg); }
}

.dev-debug {
	display: block;
	align-items: center;
	text-align: center;
}

.dev-debug-width {
	margin:20px auto 0;
	width:fit-content;
	overflow:auto;
	max-width:calc(100% - 40px);
    max-height: 480px;
    border: 1px solid #ccc;
}

.dev-orders-table th {
    position: sticky;
    top: 0;
    background: #666 !important;
	color: #fff;
}

.dev-orders-table .order_link,
.dev-orders-table .order_email {
	background-color: #ddd;
}

.dev-orders-table .order_no {
    border-left-style: solid;
    border-left-width: 6px;
}
.dev-orders-table .on-prefix-11 .order_no,
.dev-orders-table .on-prefix-16 .order_no,
.dev-orders-table .on-prefix-90 .order_no {
    border-left-color: #009ad7;
}
.dev-orders-table .on-prefix-15 .order_no {
    border-left-color: #fdfe00;
}
.dev-orders-table .on-prefix-13 .order_no {
    border-left-color: #f04c43;
}

.column-toggle-controls,
.row-toggle-controls {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgb(255, 255, 255);
    border: 1px solid rgb(204, 204, 204);
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 5px;
    width: min( calc(100vw - 20px), 900px);
    max-height: 300px;
    overflow: auto;
    text-align: left;
}
.column-toggle-controls > label,
.row-toggle-controls > label {
    margin: 4px 8px;
    display: inline-flex;
}

.email-preview-btn, #close-email-modal, #email-modal-send-email {
    cursor: pointer;
}
#email-preview-iframe {
    width: calc(100% - 40px);
    height: 600px;
    margin: 20px;
}
#email-preview-modal {
    display: block;
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(-20px + 100vw);
    max-width: 900px;
    max-height: 80%;
    overflow: auto;
    background: rgb(255, 255, 255);
    border: 1px solid rgb(204, 204, 204);
    z-index: 9999;
}
#email-preview-modal-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px;
    gap: 6px 18px;
    border-top: 1px solid;
    background-color: #ddd;
}
#close-email-modal {
    margin-left: auto;
}