/* display: flex; justify-text: center; gap line-height: 1.5*/

body {
    font-family: 'Arial', sans-serif;
    background-color: #333;
    color: #333;	
    align-items: center;
    padding: 0;
	margin: 0;
	background: url("images/backgrounds/background-image-3.jpg") no-repeat calc((100vw - 600px) / 2) top;
}

header {
    background-color: white;
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

header img#logo {
	height: 100px;
    width: auto;
    display: block;
}

section#progress {
	padding: 6px;
	background-color: #303030;
	height: 20px;
	color: white;
}

section#progress p {
	color: white;
	font-weight: bold;
	font-size: 16px;
	margin: 0px;
}

main {
    min-height: calc(100vh - 148px); /* 148px footer min-height */
    box-sizing: border-box;
    padding: 24px;
    background-color: white;
	margin: 0 auto 0 0;
	min-width: 260px;
	max-width: 600px;
}

div.checkout-container {
	background-color: #fff;
	margin: 0 auto 0 auto;
	min-width: 240px;
	max-width: 420px;	
}

h1, h2, h3 {
    font-size: 16px;
	padding-left: 8px;
}

header h1 {
	padding: 0px;
	margin: 0px;
	display: none;
}

header p {
	font-size: 1.2em;
	font-weight: normal;
	margin: 20px 0 0 0;
}

h2 {
	color: #333;
    margin-bottom: 10px;
    color: #32325d;
    font-size: 24px;
    font-weight: 600;
}

h3 {
	color: #333;
    text-align: left;
    margin: 12px 0 8px;
    font-size: 16px;
    font-weight: 500;
}
 
/* shopping-cart.php specific */

button {
    background-color: #307F7A;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
	height: 17px;
}

button:hover {
    background-color: #218838;
}

.discount-form {
  display: flex;
  width: 100%;
  gap: 0.5rem; /* optional spacing between input and button */
}

.discount-form .discount {
  flex: 1 1 auto;
  min-width: 0 !important; /* prevents overflow */
}

.discount-form .discount_btn {
  flex: 0 0 auto;
  width: 40px;
  height: 32px;
  padding: 4px;
}
/* end chat gpt */

.cart-table {
    min-width: 280px;
	max-width: 480px;
    border-collapse: collapse;
	margin: 20px auto 0 auto;
	table-layout: fixed;
	box-sizing: border-box;
	font-size: 16px;
}

p.cart-empty {
    min-width: 280px;
	max-width: 480px;	
	padding: 24px;
	padding-top: 18px;
	border-radius: 6px;
	border: 2px solid red;
	margin: 24px auto 24px auto;
	box-sizing: border-box; 
}

.cart-table th {
    background-color: #f8f9fa;
}

.cart-table th, .cart-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
	min-width: 60px;
	width: 60px;
}

.cart-table th.product, .cart-table td.product {
	text-align: left;
	min-width: 140px;
	width: 100%;
}

.cart-table tr.product-row td {
  border-bottom: none;
}

.cart-table tr.quantity-row td {
  border-top: none;
}

.cart-table .quantity-cell .qty-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
}

.cart-table .quantity-cell .qty-wrap a,
.cart-table .quantity-cell .qty-wrap span {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0;
}

.remove-btn {
  background-color: #c0392b;
  height: 32px;  
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-weight: normal;
  cursor: pointer;
  margin-left: 1rem;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.remove-btn:hover {
  background-color: #e74c3c;
  transform: scale(1.05);
}

.remove-btn:active {
  background-color: #a93226;
  transform: scale(0.98);
}

.remove-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.4);
}

.form-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 640px;
}

.form-label {
  width: 180px;
  height: 32px;
  line-height: 32px;
  font-weight: bold;
  text-align: right;
  flex-shrink: 0;
}

.form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  line-height: 32px;
}

.form-field:has(.tooltip-error) {
  gap: 0;
}

.discount-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-field select, .form-field input, .form-field span {
  flex: 1;
  height: 34px;
  line-height: 34px;
  padding: 6px;
  font-size: 16px;
  margin: 0px;
}

.discount_btn {
  height: 34px;
  padding: 4px 8px;
  font-size: 16px;
  background-color: #2b7c7c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;  
  align-items: center;
  justify-content: center;
}

.cart-totals {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 280px;
  max-width: 480px;
  margin: 34px auto;
  font-size: 16px;
  align-content: center;
}

.cart-totals .form-row label {
	font-weight: bold;
	margin: 0px;
	padding: 0px;
}

.form-field:has(.tooltip-error) {
  flex-direction: column;
}

/* END shopping-cart.php specific */

/* checkout.php specific */

label, span {
  text-align: left;
  padding-bottom: 4px;
  color: #333;
  display: inline-block;
  font-size: 16px;
}

fieldset {
	width: 100%;
	background-color: #fff;
	border: 0px;
	border-radius: 8px;
	margin: 0 auto 0 auto;
	padding: 0;
	margin: 0;
}

fieldset legend {
	font-weight: bold;
	color: #303030;
	padding-top: 24px;
	padding-bottom: 8px;
}

div.input {
	min-width: 280px;
	max-width: 360px;
	padding: 8px;
	margin-left: auto;
	margin-right: auto;
	font-size: 16px;
	border: 0px;
}

div.input a {
	display: block;
	padding: 4px 0;
	font-size: 14px;
}

input, select, textarea, span.input {
    width: 100%;
    padding: 10px;
    border: 1px solid grey;
    border-radius: 4px;
	box-sizing: border-box;
    font-family: 'Arial', sans-serif;	
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s;
}

input[readonly], span.input {
	background-color: #ccc;
}

input:focus {
    border-color: #6772e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(103, 114, 229, 0.2);
}

div.checkbox input {
	width: auto;
}

div.checkbox label {
	font-size: 16px;
}
/* END checkout.php specific */

#stacked-button-container {
	box-sizing: border-box;
	min-width: 220px;
	max-width: 300px;
	margin: 24px auto 24px auto;
}

.checkout-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #307F7A;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
	width: auto;
}

.checkout-btn:hover {
    background-color: #41a698;
}

#stacked-button-container button, #stacked-button-container a.checkout-btn {
	box-sizing: border-box;	
	width: 100%;
	margin: 0 0 12px 0;	
	height: 46px;
	font-size: 16px;
	padding: 4px;
	color: #fff;
    transition: all 0.3s;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;	
}

#stacked-button-container button.opayo {
	background-color: #662D91;
	background-image:  url('/images/payments/opayo-button-logo.png');
	background-position: 8px center;
	background-repeat: no-repeat;
	background-size: auto 32px;
}

#stacked-button-container button.opayo:hover {
	background-color: #4E2172;
}

#stacked-button-container .opayo img {
  height: 38px;
  vertical-align: middle;
}

#stacked-button-container button.negative, #stacked-button-container a.negative {
	background-color: #696969;
}

#stacked-button-container button.negative:hover, #stacked-button-container a.negative:hover {
	background-color: #808080;
}

#stacked-button-container button.paypal {
	background-color: #FFC539;
}

#stacked-button-container button.paypal:hover {
	background-color: #F2BA36;
}

#button-container {
	box-sizing: border-box;
	width: 100%;
	margin: 16px auto 16px auto;
	text-align: right;
}

#button-container button {
    width: auto;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

#button-container a {
	border-radius: 6px;
	font-size: 16px;
	display: inline-block;
}

p#message {
	padding: 24px;
	padding-top: 18px;
	border-radius: 6px;
	border: 2px solid red;
	margin: 24px auto 24px auto;
	width: 100%;
	box-sizing: border-box; 
}

#messageDialog strong.unsuccessful {
	color: red;
}

#messageDialog strong.successful {
	color: green;
}

dialog {
  border: none;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  width: 320px;
  text-align: center;
}

dialog h2 {
  margin-top: 0;
  margin-left: 0;
  padding-left: 0;
  font-size: 20px;
  color: #333;
  font-weight: 700;
  text-align: left;  
}

dialog p {
  font-size: 14px;
  margin-bottom: 16px;
  color: #555;
  text-align: left;
}

dialog button {
	padding: 12px 24px;
	width: auto;
	height: auto;
}

dialog div.form-group {
  margin-bottom: 16px;
}

dialog div.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  text-align: left;
}

dialog div.form-group select, dialog div.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

dialog div.button-group {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

dialog div.button-group button {
  background-color: #307F7A;
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

dialog div.button-group button:hover {
  background-color: #286b67;
}

footer {
    background-color: #454545;
    color: #ffffff;
    width: 100%;
    padding: 20px;
    text-align: right;
    box-sizing: border-box;
    min-height: 80px;
}

footer ul#foot, footer ul#foot2 {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-block;
}

footer ul#foot li, footer ul#foot2 li {
    display: inline-block;
    margin: 0 12px;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.2s ease;
}

footer a:hover {
    text-decoration: underline;
    color: #dddddd;
}

/* Responsive fallback: stack footer links on small screens */
@media screen and (max-width: 450px) {
    footer {
        text-align: center;
    }

    footer ul#foot, footer ul#foot2 {
        display: block;
    }

    footer ul#foot li, footer ul#foot2 li {
        display: block;
        margin: 8px 0;
    }
}

/* Mobile-Friendly */
@media screen and (max-width: 450px) {
    div.checkout-container, div.container {
        width: 90%;
        padding: 25px;
    }
}
