/* Domino's Supplier Form - CSS Stylesheet
   Based on Domino's Pizza brand guidelines and modern form design 
*/

/* Base styling and variables */
:root {
  --dominos-blue: #006491;
  --dominos-red: #e31837;
  --dominos-dark-blue: #00527a;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #4a4a4a;
  --white: #ffffff;
  --input-border: #c4c4c4;
  --success-green: #43a047;
  --error-red: #d32f2f;
  --font-family: 'Arial', sans-serif;
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --border-radius: 4px;
}

/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--dark-gray);
  line-height: 1.6;
  background-color: var(--light-gray);
  
}

/* Form Container */
#Supplier {
  width: 80%;
  margin: auto;
  padding-top: 10px;
  padding-left: 50px;
  padding-right: 50px;
  padding-bottom: 20px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
  
}

.supplierformheading {
  font-size: 20px;
  font-weight: 700;
  margin: auto;
  width: 50%;
  text-align: center;
  color: var(--dark-gray) !important;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.label-input-pair {
  display: flex;
  align-items: center;
  gap: 10px; /* space between label and input */
  padding: 10px; /* padding around the pair */
}

.centerDiv { 
  margin: auto;
  width: 50%;
  text-align: center;
  
  
}

.primarybutton {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--dominos-blue);
  color: var(--white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

a.primarybutton:hover,
a.primarybutton:focus {
  background-color: var(--dominos-blue) !important;
  text-decoration: none !important;;
  color:var(--white) !important;;
}

/* Header styling */
h4 {
  color: var(--dark-gray) !important;
  padding: 5px 15px 5px;
  margin: 10px 0 20px 0;
  font-size: 16px;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;

}

h4:first-of-type {
  margin-top: 0;
}

h4::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--dominos-red);
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  margin-bottom: 5px;
}

/* Section styling */
.productinfosection {
  gap: 3px;
  margin-bottom: 3px;
  
}

.inputsection {
  display: flex;
  width: calc(50% - 10px);
  background-color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  padding: 3px 3px;
  align-items: center;
  transition: all 0.3s ease;
}

.inputsection:hover {
  box-shadow: 0 0 5px rgba(0, 100, 145, 0.2);
}


.inputsectionSingleColumn:hover {
  border-color: var(--dominos-blue);
  box-shadow: 0 0 5px rgba(0, 100, 145, 0.2);
}

/* Width classes */
.w-50 {
  width: 50%;
}

.w-50text-left {
  width: 50%;
  text-align: left;
}

.w-50text-leftSelect {
  width: 50%;
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Label styling */
label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
  color: var(--dark-gray);
  font-size: 10pt
}

/* Form controls styling */
input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 10pt;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--dominos-blue);
  box-shadow: 0 0 0 2px rgba(0, 100, 145, 0.2);
}

select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23555" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px;
}

/* Button styles */
.submitbuttontext {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#SaveasDraft {
  background-color: var(--white);
  color: var(--dominos-blue);
  border: 2px solid var(--dominos-blue);
}

#SaveasDraft:hover {
  background-color: rgba(0, 100, 145, 0.1);
}

#SupplierSubmit {
  background-color: var(--dominos-blue);
  color: var(--white);
}

#SupplierSubmit:hover {
  background-color: var(--dominos-dark-blue);
}

/* Loader styling */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--medium-gray);
  border-top: 5px solid var(--dominos-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .productinfosection {
    flex-direction: column;
    gap: 15px;
  }
  
  .inputsection {
    width: 100%;
  }
  
  h4 {
    font-size: 16px;
  }
  
  .submitbuttontext {
    flex-direction: column;
    width: 100%;
  }
  
  button {
    width: 100%;
  }
}

/* Additional Domino's branding elements 
#Supplier::before {
  content: '';
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="40" height="40"><path fill="%23e31837" d="M0,0v50h50V0H0z"/><path fill="%23fff" d="M7,7v36h36V7H7z"/><path fill="%23e31837" d="M14,14v22h22V14H14z"/></svg>');
  background-repeat: no-repeat;
  width: 40px;
  height: 40px;
  position: absolute;
  top: -20px;
  left: -20px;
  z-index: 1;
}

/* Form title */
title {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: var(--dominos-blue);
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--dominos-red);
}

/* Form validation styling */
input:invalid,
select:invalid {
  border-color: var(--error-red);
}

/*input:valid,
select:valid {
  border-color: var(--success-green);
}

/* Required field indicator 
label[for]::after {
  content: "*";
  color: var(--dominos-red);
  margin-left: 3px;
}

/* Focus indicators for accessibility */
input:focus,
select:focus,
button:focus {
  outline: 2px solid var(--dominos-blue);
  outline-offset: 2px;
}

/* Hover effects for better UX */
input:hover,
select:hover {
  border-color: var(--dominos-blue);
}

/* Add Domino's themed scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--dominos-blue);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dominos-dark-blue);
}