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

header {background: #000; color: #fff;}
footer {background: #000; color: #fff;}

:root {
    --border:              #ddd;
    --bg:                  #eee;
    --error:               #b50000;
    --error-bg:            #ffe7e7;
    --error-border:        #dda3a3;
    --success:             #27ae60;
    --radius:              4px;
    --max-width:           640px;    
    --btn-color:           #fff;
    --btn-bg:              #333;
    --btn-hover-color:     #fff;
    --btn-hover-bg:        #000;
}

html { font-size: 15px;  -webkit-text-size-adjust: 100%; }
body {font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; padding: 0; margin: 0; }
button, select, input[type=text], input[type=email], textarea {font-size: inherit; font-family: inherit; font-weight: inherit; }
a {color: inherit; text-decoration : underline;}
input[type="text"], input[type="email"], select, textarea {width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; color: #000; background: #fff; transition: border-color 0.15s; appearance: none; -webkit-appearance: none; }
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus {border-color: #bbb; outline: 4px solid #eee;}
input::placeholder {
    color: #ccc;
    opacity: 1; /* Firefox lowers opacity by default, this overrides it */
}
textarea {display: block;}
.is-invalid {border-color: var(--error);}

h1 {font-weight: 600; font-size: 1.4em; color: #000; margin: 1em 0 0 0; }
h2 {font-weight: 600; font-size: 1.3em; color: #000; margin: 1em 0 0 0; }
p {margin: 0.5rem 0;}
h1 + p {margin-top: 0;}
hr {margin: 1em 0; border: none; height: 1px; background: #ccc;}
b {color: #000; font-weight: 600; }
strong {color: #000; font-weight: 600; }

.container {width: 100%; max-width: var(--max-width); margin: 0 auto;  padding: 20px; }

header {padding: 20px; }
header a {display: block; text-decoration: none; text-align: center; background-position: center; background-repeat: no-repeat; background-size: contain; } 
header a > img {display: block; max-height: 45px; width: auto; max-width: 100%; margin: 0 auto; }

main {flex: 1; width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px;}

.card {background: #fff; border-radius: var(--radius); padding: 0 30px; margin: 20px 0; box-shadow: 0 1px 10px rgba(0,0,0,0.1); color: #333;  }
.card::before {content: ''; display: block; padding-top: 1px; margin-bottom: 30px; }
.card::after {content: ''; display: block; padding-bottom: 1px; margin-top: 30px; }

.form-group {margin: 1em 0;}
.form-group label { display: block; font-size: 1rem; font-weight: 500; margin-bottom: 3px; }
.form-group .hint {font-size: 0.8em; color: #555; }
.form-group .error-message {display: none;}
.form-group.error .error-message {color: var(--error); margin-top: 3px; display: block; }

.alert {padding: 5px 10px; border-radius: var(--radius); margin: 5px 0; font-weight: 500; background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error); }

#images {display: none;}
#images .thumbs {border: 1px solid var(--border); padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px; margin: 5px 0 10px 0; border-radius: var(--radius); }
#images .thumbs:empty {display: none; }
#images .thumbs div {position: relative; border: 1px solid var(--border); background: #eee; }
#images .thumbs div img {display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
#images .thumbs div a {display: none;}
#images .thumbs div:hover a {position: absolute; display: block; top: -9px; right: -9px; width: 20px; height: 20px; background: var(--error); border-radius: 50%; z-index: 1; }
#images .thumbs div:hover a:before {content: ""; position: absolute; top: 50%; left: 3px; right: 3px; height: 2px; margin-top: -1px; background: #fff; transform: rotate(45deg); }
#images .thumbs div:hover a:after {content: ""; position: absolute; top: 50%; left: 3px; right: 3px; height: 2px; margin-top: -1px; background: #fff; transform: rotate(-45deg); }

#description {display: none;}
#qty {display: none;}

button, .button {display: inline-block; position: relative; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; color: var(--btn-color); background: var(--btn-bg); transition: all 0.2s;  cursor: pointer; border: none; text-decoration: none; transition: all 0.15s; line-height: 1.1; padding: 8px 15px}
button:hover, .button:hover {color: var(--btn-hover-color); background: var(--btn-hover-bg); }
button:disabled, .button:disabled { opacity: 0.6; pointer-events: none }
button .fa, .button .fa {width: auto;}

.loading button[type=submit] {color: transparent; pointer-events: none; }
.loading button[type=submit]::before, .loading button[type=submit]::after {content: ''; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin-top: -11px; margin-left: -11px; border: 3px solid var(--btn-color); border-radius: 50%; }
.loading button[type=submit]::before {opacity: 0.25; }
.loading button[type=submit]::after {border-color: transparent transparent transparent var(--btn-color); animation: spin 1s linear infinite; }

.button-group {margin: 30px 0;}
.button-group button, .button-group .button {width: 100%; padding: 12px; font-size: 1.05em; }

.order-meta {margin: 1rem 0; background: #eee; border: 1px solid #eee; padding: 10px; margin: -10px -10px 1em -10px; border-radius: var(--radius); font-size: 14px; }
.order-meta .small {font-size: 0.7rem; opacity: 0.7;}

table {width: 100%; border: none; margin: 1em 0; }
table tr td {text-align: center; padding: 4px; }
table tbody tr td {border-top: 1px solid #ddd;}
table tr td:first-child {text-align: left; padding-left: 0;}
table tr td:last-child {text-align: right; padding-right: 0;}
table tr td a {color: inherit; text-decoration: none; }

.item-list {margin: 1em 0; }
.item-list label {display: flex; align-items: center; justify-content: flex-start; gap: 10px;}
.item-list label:not(:last-child) { padding-bottom: 1em; border-bottom: 1px solid var(--border); margin-bottom: 1em; }
.item-list label > img {border-radius: var(--radius); width: 80px; height: 80px; object-fit: contain; border: 1px solid var(--border); flex: 0 0 auto; }
.item-list label .img-placeholder {border-radius: var(--radius); width: 80px; height: 0; padding: 40px 0; line-height: 0; border: 1px solid var(--border); background: var(--bg); color: #ccc; font-size: 30px;  flex: 0 0 auto;}
.item-list label > div {flex: auto;}
.item-list label {cursor: pointer;}
.item-list label i.check {position: relative; display: block; width: 20px; height: 20px; border: 1px solid #ccc; color: transparent; flex: 0 0 auto; }
.item-list label:has(input[type=checkbox]:is(:checked)) i.check {border: 1px solid #333; background: #333; color: #fff;}
.item-list label input[type=checkbox] {position: absolute; opacity: 0.01;}
.item-list label .warning {border: 1px solid #f00; border-radius: 4px; background: pink; padding: 2px 5px;  }
.item-list label.inactive {pointer-events: none;}
.item-list label.inactive i.check {background: #ddd; border-color: #dddd;}
.item-list label.inactive i.check:after {content: ""; position: absolute; top: 50%; left: 3px; right: 3px; height: 2px; margin-top: -1px; background: #fff;}
.item-list label.inactive input {}

.item-group {display: flex; gap: 10px; align-items: center; margin: 1em 0; width: 100%;}
.item-group img {border-radius: var(--radius); width: 80px; height: 80px; object-fit: contain; border: 1px solid var(--border); }
.item-group .img {border-radius: var(--radius); width: 80px; height: 0; padding: 40px 0; line-height: 0; border: 1px solid var(--border); background: var(--bg); color: #ccc; font-size: 30px; }
.item-group > div {flex-grow: 1;}
.return-info {margin: 1em 0;}
.return-info > div {margin: 0.5em 0;}

.progress-indicator {margin: 0.5em 0; font-size: 0.8em; opacity: 0.8;}

.item-summary > div {border-top: 1px solid var(--border); }
.item-summary > div:before {content: ""; display: block; padding-top: 1px; margin-bottom: 1rem; }
.item-summary > div:after {content: ""; display: block; padding-bottom: 1px; margin-top: 1rem; }
.item-summary > div > div {margin: 1rem 0; line-height: 1.2 }

.thumbs_small {display: flex; gap: 3px; margin: 6px 0; }
.thumbs_small img {border-radius: var(--radius); width: 50px; height: 50px; object-fit: contain; border: 1px solid var(--border); background: #eee; }

footer {text-align: center; color: #fff; }
footer > div {max-width: 1000px; margin: 0 auto; padding: 20px; }
footer nav { margin: 0.5em 0; }
footer nav a { display: inline-block; margin: 0 15px; font-size: 14px; color: inherit; text-decoration: none; font-weight: 500; }
footer nav a:hover {color: inherit; text-decoration: underline; }
footer p {font-size: 12px; margin: 0.5em 0; opacity: 0.7; }

.upload-progress {position: fixed; display: flex; align-items: center; justify-content: center; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.2);}
.upload-progress > div {padding: 20px; background: #fff;}
.upload-progress > div .bar {position: relative; width: 200px; margin: 8px 0; height: 12px; background: #f7f7f7; border: 1px solid #ccc; }
.upload-progress > div .bar:last-child {margin-bottom: 0;}
.upload-progress > div .bar i {position: absolute; top: 0; left: 0; height: 100%; background: var(--error); }
.upload-progress > div .bar:not(".complete") i:after {
	content: "";
	position: absolute;
	top: 0; left: 0; bottom: 0; right: 0;
	background-image:
		linear-gradient(
		  -45deg,
		  rgba(255, 255, 255, .25) 25%,
		  transparent 25%,
		  transparent 50%,
		  rgba(255, 255, 255, .25) 50%,
		  rgba(255, 255, 255, .25) 75%,
		  transparent 75%,
		  transparent
	   );
	z-index: 1;
	background-size: 40px 40px;
	animation: move 2s linear infinite;
}
@keyframes move {
	0% {background-position: 40px 40px;}
	100% {background-position: 0 0;}
}

.g-recaptcha {
    margin: 15px 0;
}
 
@keyframes spin {
    to { transform: rotate(360deg); }
}

.messages {}
.messages .message-list > div {position: relative; background: #f7f7f7; padding: 0 20px; margin: 15px 0; border-radius: 5px;  }
.messages .message-list > div:before {content: ""; display: block; padding-top: 1px; margin-bottom: 20px; }
.messages .message-list > div:after {content: ""; display: block; padding-bottom: 1px; margin-top: 20px; }
.messages .message-list > div .date {font-size: 12px; opacity: 0.6; margin-top: 8px; }
.messages .message-list > div.admin {background: #444; margin-right: 30px; color: #fff; }
.messages .message-list > div.admin .arrow {
    content: ""; position: absolute; left: 6px; top: 100%; width: 0; height: 0;
    border-style: solid;
    border-width: 12px 20px 0 0 ;
    border-color: #444 transparent transparent transparent;
}
.messages .message-list > div.customer {background: #f7f7f7; border: 1px solid #ccc; margin-left: 30px; }
.messages .message-list > div.customer .arrow {
    content: ""; position: absolute; right: 6px; top: 100%; width: 0; height: 0;
    border-style: solid;
    border-width: 12px 0 0 20px;
    border-color: #ddd transparent transparent transparent;
}
.messages .message-list > div.customer .arrow:after {
    content: ""; position: absolute; right: 1px; bottom: 2px; width: 0; height: 0;
    border-style: solid;
    border-width: 12px 0 0 20px;
    border-color: #f7f7f7 transparent transparent transparent;
}
.messages .message-list .attachments {border-top: 1px solid rgba(125,125,125,0.7); border-bottom: 1px solid rgba(125,125,125,0.7); padding: 10px 0; margin: 1em 0;;}
.messages .message-list .attachments_title {font-weight: 700; }
.messages .message-list .attachments > a {display: flex; gap: 10px; margin: 10px 0; text-decoration: none; align-items: center; line-height: 1.4;}
.messages .message-list .attachments > a > i {font-size: 25px; }
.messages .message-list .attachments > a span {display: block;}
.messages .message-list .attachments > a .small {font-size:12px; opacity: 0.6; }

.card-404 {}
.card-404 h1 {margin-top: 5px; }
.card-404 .fa {color: var(--error);}

header {background: #02a7de; border-bottom: 6px solid #1e568b; }
header a {background-image: url(../img/hb-logo.png); height: 60px; }
footer {background: #1e568b; }
button, .button {background-color: #01a770; color: #fff; }
button:hover, .button:hover {background-color: #1dd397; color: #fff;}