/* ============================================
   SAMPLE REQUEST FORM - CSS
   ============================================ */

/* ============================================
   1. BASE STYLES
   ============================================ */

body {
  font-family: "Noto Sans JP", sans-serif;
}

a {
  color: #e08d55;
  text-underline-offset: 2px;
}

.hidden {
  display: none;
}


/* ============================================
   2. TYPOGRAPHY
   ============================================ */

.h3, h3 {
  font-size: 1.4rem;
}

.small, small {
  font-size: .69em;
  color: rgb(103, 105, 112);
}

h5.model-header {
  margin-bottom: 0;
}


/* ============================================
   3. LAYOUT & CONTAINERS
   ============================================ */

.title-wrapper {
  text-align: center;
}

.title-wrapper, form, .sucess-wrapper, .failure-wrapper {
  max-width: 1000px;
  margin: auto;
  padding: 1.5rem;
}

.contact-form-text {
  max-width: 1000px;
  margin: auto;
  padding: 1.5rem;
  text-align: left;
}

.container-wrapper form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: 15px;
}

.sucess-wrapper {
  max-width: 800px;
  margin: auto;
}

.separation_special {
  padding: 100px 0 15px;
  background-color: white;
}


/* ============================================
   4. FORM ELEMENTS - GENERAL
   ============================================ */

.form-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: 10px;
  width: 100%;
  margin: 0;
  padding: 1rem 0;
  align-items: flex-start;
}

.form-group label {
  min-width: 260px;
  position: relative;
  margin-bottom: 0;
  display: flex;
  column-gap: 10px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: calc(100% - 40px);
}

.form-group label:first-child {
  width: 260px;
  margin-top: 11px;
}

.form-group p {
  margin-left: 271px;
  margin-bottom: 0px;
}

/* Input Fields */
input {
  width: calc(100% - 270px);
  padding: 10px 12px;
}

input, textarea, select {
  border-radius: 2px;
  border: 1px solid #dcd5cf;
  color: #534842;
  background: #ffffff;
  font-size: max(1rem, 16px);
  box-shadow: 0 1px rgba(231, 226, 222, .25) inset;
  transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out, color .2s ease-in-out;
}

select {
  padding: 10px 12px;
}

input[type=checkbox], input[type=radio] {
  display: block;
  margin: auto;
  height: fit-content;
  width: fit-content;
  margin: 0;
}

textarea {
  width: calc(100% - 270px);
  min-height: 80px;
  max-height: 450px;
  padding: 10px 12px;
}

input[type="tel"] {
  width: calc(75% - 270px);
}

input#catalog_quantity {
  width: 150px;
}

/* Form Control Overrides (Bootstrap) */
.form-control {
  border-radius: 0px;
  background-color: #fdfdfd;
  font-size: 14px;
}

.form-control:focus {
  border-color: #aadbe8;
  outline: 0;
  -webkit-box-shadow: inset 0 0px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.4);
  box-shadow: inset 0 0px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.4);
  background-color:#fff;
}

textarea.form-control {
  height: 200px;
}

/* Placeholder Styles */
::-webkit-input-placeholder { font-size: 13px; }
:-moz-placeholder { font-size: 13px; }
::-moz-placeholder { font-size: 13px; }
:-ms-input-placeholder { font-size: 13px; }
::placeholder{ font-size: 13px; }


/* ============================================
   5. FORM ELEMENTS - SPECIFIC
   ============================================ */

/* Required Badge */
.input_required:after {
  content: "\5fc5\9808";
  display: block;
  position: relative;
  padding: 3px;
  font-size: .6em;
  background-color: #db4f4a;
  color: #fff;
  width: 27px;
  margin-top: 3px;
  text-align: center;
  font-size: 9px;
}

/* Radio Groups */
.radio-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 35px;
  justify-content: flex-start;
  padding: 10px 12px 10px 0;
  background-color: white;
  width: calc(100% - 270px);
}

.radio-group .radio-option {
  width: calc(50% - 20px);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  align-content: center;
  column-gap: 5px;
  cursor: pointer;
}

.form-group.gender .radio-group .radio-option {
  width: fit-content;
}

.radio-group .radio-option label {
  margin-bottom: 0;
  min-width: unset;
  width: calc(100% - 25px);
}

.form-check-input[type=radio] {
  width: 16px;
  height: 16px;
  padding: 0;
}

.form-check-input:checked[type=radio] {
  background-color: #E08D55;
  border-color: #E08D55;
  --bs-form-check-bg-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e);
}

/* Checkbox Groups */
.checkbox-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  width: calc(100% - 270px);
  padding: 10px 12px 12px 0;
}

.checkbox-option {
  gap: 11px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.form-group.survey-field.checkbox {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group.survey-field.checkbox label {
  width: 100%;
}

.form-group.survey-field.checkbox .checkbox-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: calc(100% - 20px);
  margin-left: 20px;
}

.checkbox-container .checkbox-option {
  width: calc(50% - 15px);
}

.form-group.survey-field.checkbox .checkbox-option.with-text-input label {
  width: calc(100% - 45px);
}

/* Checkbox with Text Input */
.checkbox-option.with-text-input {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: flex-start;
}

.checkbox-option.with-text-input textarea {
  flex: 1;
  width: 100%;
  max-width: unset;
  margin-left: 25px;
  min-height: 80px;
}

.checkbox-option.with-text-input input[type="checkbox"]:not(:checked) + label + textarea,
.checkbox-option.with-text-input input[type="checkbox"]:not(:checked) ~ textarea {
  display: none;
}

/* Checkbox with Textarea */
.checkbox-option.with-textarea {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.checkbox-option.with-textarea .checkbox-label-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-option.with-textarea textarea {
  width: 100%;
  max-width: 600px;
}

/* Name Input Groups */
.name-input-group, .company-input-group {
  display: flex;
  gap: 10px;
  width: calc(100% - 270px);
}

.name-input-group input, .company-input-group input {
  width: 50%;
}


/* Birthday Select Group */
.birthday-select-group {
  display: flex;
  gap: 5px;
  align-items: center;
  width: calc(100% - 270px);
}

.birthday-select-group select,
.birthday-select-group input[type="text"] {
  width: 60px;
}

.birthday-select-group select:nth-child(5),
.birthday-select-group input[type="text"]:nth-child(5) {
  width: 80px;
}


/* ============================================
   6. ADDRESS & POSTAL CODE
   ============================================ */

span.labelAdresse {
  min-width: 260px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  column-gap: 10px;
}

.address-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  row-gap: 30px;
  align-items: center;
  padding: 15px 0;
  column-gap: 10px;
}

.address-container label.adresse {
  width: calc(100% - 270px);
  margin-left: 270px;
}

.address-container .p-region, 
.address-container .p-street-address, 
.address-container .address2 {
  width: calc(100% - 270px);
  margin-left: 270px;
}

.address-container p {
  grid-area: graySign;
  text-align: left;
  margin-left: 20px;
  margin-bottom: 0;
}

.posteCode {
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 15px;
}

.p-postal-code {
  width: 140px;
}

.adresse-info {
  background-color: #bababa;
  height: fit-content;
  padding: 7px;
  font-size: 11px;
  border-radius: 10px;
  margin-left: 5px;
}


/* ============================================
   7. DATE & TIME
   ============================================ */

.date_block {
  width: calc(100% - 270px);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

#delivery_date {
  width: calc(100% - 160px);
  max-width: 100%;
}

.delivery_date_time {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 15px;
  width: 150px;
}


/* ============================================
   8. PRODUCT TABLE
   ============================================ */

.product-input-wrapper {
  padding: 2vw 0;
  width: 100%;
}

.product-table {
  margin: 20px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  row-gap: 20px;
}

button#addRow {
  width: fit-content;
  align-self: flex-end;
}

#productTable {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

#productTable th, #productTable td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

#productTable th {
  background-color: #f2f2f2;
}

#productTable input[type="text"],
#productTable input[type="number"] {
  width: 95%;
  padding: 5px;
  box-sizing: border-box;
}

#productTable2 input[type="text"], 
#productTable2 input[type="number"] {
  width: 95%;
  padding: 5px;
  box-sizing: border-box;
}

.add-row-btn {
  background-color: #4CAF50;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.add-row-btn:hover {
  background-color: #45a049;
}

.remove-row {
  background-color: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  height: fit-content;
  font-weight: bold;
  padding: 0 1px 5px 1px;
}

/* Product Grid Layout */
.product-header {
  display: flex;
}

.product-header div {
  font-weight: bold;
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  background-color: #f2f2f2;
}

.product-row {
  display: flex;
}

.product-row .table-row {
  border-right: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.table-row.table-column {
  border-left: 1px solid #ddd;
}

.table-row.table-button {
  display: flex;
  align-items: center;
}

.table-row.table-button svg {
  width: 15px;
  height: 15px;
}

.table-row.table-button svg path {
  fill: gray;
}

.table-column {
  width: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.table-sku {
  width: 200px;
}

.table-product {
  width: 395px;
}

.table-number {
  width: 75px;
}

.table-button {
  width: 35px;
}


/* ============================================
   9. SAMPLE COLOR SELECTION
   ============================================ */

.sample-color-wrapper {
  margin-bottom: 30px;
  margin-top: 30px;
}

.sample-color-item {
  display: flex;
  flex-direction: column;
}
.sample-color-item:not(:last-child) {
  border-bottom: 1px solid lightgray;
  margin-bottom: 20px;
  padding-bottom: 30px;
}

.sample-color-item h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

.sample-color-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 5px;
}

.sample-color-item-header h4 {
  margin-bottom: 0;
  border-bottom: none;
  font-size: 16px;
  font-weight: normal;
}

.sample-color-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 8px;
}

.sample-color-item-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sample-color-item-block:not(:last-child) {
  padding-bottom: 5px;
}

/* Model Title */
.model-title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
}

.model-title-wrapper h5.model-header {
  min-width: 80px;
  font-size: 15px;
  font-weight: normal;
}

/* Color Checkboxes */
.color-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 5px;
}

.color-checkbox-option {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 5px;
  align-items: center;
  width: fit-content;
}

.color-checkbox-option input[type='checkbox'] {
  display: none;
}

.color-checkbox-option label {
  display: inline-block;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.2s;
  min-width: 70px;
  text-align: center;
  border-radius: 2px;
  border: 1px solid #dcd5cf;
  color: #534842;
  background: #ffffff;
  box-shadow: 0 1px rgba(231, 226, 222, .25) inset;
}

.color-checkbox-option input[type='checkbox']:checked + label {
  background-color: #E08D55;
  color: white;
  border-color: #E08D55;
  box-shadow: none;
}

.color-checkbox-option label:hover {
  background-color: #e9ecef;
}

.color-checkbox-option input[type='checkbox']:checked + label:hover {
  background-color: #d67c44;
}

/* Disabled Checkboxes */
.color-checkbox-option.disabled,
.color-checkbox-option input[type='checkbox']:disabled + label {
  background-color: #f5f5f5;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
  opacity: 0.6;
  text-decoration: line-through;
}

.color-checkbox-option.disabled label {
  background-color: #f5f5f5;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
  text-decoration: line-through;
}

.color-checkbox-option input[type='checkbox']:disabled + label:hover,
.color-checkbox-option.disabled label:hover {
  background-color: #f5f5f5;
}

/* All Color Button */
.all-color-button .color-checkbox-option label {
  background-color: lightgray;
  color: black;
  border-color: lightgray;
  min-width: 50px;
  padding: 5px 12px;
  font-size: 11px;
}

.all-color-button .color-checkbox-option input[type='checkbox']:checked + label {
  background-color: #5a6268;
  border-color: #545b62;
}


/* ============================================
   10. SECTION HEADERS & MISC
   ============================================ */

.section-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.section-header .required-badge {
  margin-left: 10px;
  font-size: .6em;
  background-color: #db4f4a;
  color: #fff;
  width: 27px;
  margin-top: 3px;
  padding: 2px 7px;
  text-align: center;
}


/* ============================================
   11. TERMS & AGREEMENT
   ============================================ */

.terms-container {
  border-radius: 5px;
  margin-bottom: 20px;
}

.terms-scrollable {
  max-height: 150px;
  overflow-y: auto;
  background: white;
  padding: 15px;
  border: 1px solid #ddd;
  font-size: 12px;
}

.i_agree-wrapper {
  max-width: 100%;
}

#agree_checkbox {
  margin: 0;
  position: relative;
}

.agree_checkbox {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 15px;
  max-width: 100%;
  width: 300px;
  margin: auto;
}

.agree_checkbox label {
  margin-bottom: 0;
}


/* ============================================
   12. SUBMIT BUTTON
   ============================================ */

.submit {
  max-width: 100%;
  width: 130px;
  margin: 0px auto;
  text-align: center;
}

.submit button.btn.btn-primary {
  width: 100%;
  background-color: #e08d55;
  border-color: #e08d55;
}


/* ============================================
   13. ERROR HANDLING
   ============================================ */

.error, .error-php, .error-js {
  color: red;
}


/* ============================================
   14. UTILITY CLASSES
   ============================================ */

.form-boxes {
  display: flex;
}

.box {
  width: 100px;
  height: 32px;
  font-size: 14px;
}

.red {
  width: 50px;
  height: 32px;
}

.blue {
  width: 100px;
  height: 32px;
}

.green {
  width: 100px;
  height: 40px;
}


/* ============================================
   15. MEDIA QUERIES
   ============================================ */

@media (min-width: 400px) {
  .sample-color-item-wrapper {
    margin-left: 15px;
  }
  .color-checkbox-group {
    margin-left: 10px;
  }
}



/* Desktop (800px+) */
@media (min-width: 800px) {
  .sample-color-item .sample-color-item-header {
    width: 260px;
  }
  
  .sample-color-item.multi-model .sample-color-item-header {
    width: 260px;
  }

  .sample-color-item-wrapper {
    display: flex;
    gap: 10px;
    width: calc(100% - 270px);
    margin-left: 0;
  }

  .sample-color-item {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
  }

  .sample-color-item-header {
    display: flex;
    align-items: flex-start;
  }
  
  .sample-color-item .sample-color-item-wrapper {
    display: flex;
    gap: 10px;
    width: calc(100% - 25px);
    margin-left: 25px;
  }
  
  .color-checkbox-option label {
    font-size: 12px;
  }
  
  .sample-color-item-wrapper.multi-model {
    gap: 20px;
  }
  
  .sample-color-item .sample-color-item-header {
    width: 100%;
  }
  
  .color-checkbox-option label {
    padding: 6px 10px;
  }
}

/* Mobile (max 799px) */
@media (max-width: 799px) {
  .h1, h1 {
    font-size: calc(1.10rem + 1.5vw);
  }
  
  .h3, h3 {
    font-size: calc(1rem + .6vw);
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    row-gap: 15px;
    padding: 0.5rem 0;
    text-align: center;
    align-items: flex-start;
  }
  
  .form-group label:first-child {
    width: 100%;
    text-align: left;
    font-size: 15px;
  }

  .product-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
  }

  .separation_special {
    padding: 100px 0 15px;
  }

  input, textarea, select {
    width: 100%;
  }

  .radio-group, .form-group .checkbox-container {
    width: 100%;
    row-gap: 25px;
  }

  .radio-group .radio-option {
    width: calc(50% - 20px);
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  input[type=checkbox], input[type=radio] {
    margin: 0;
  }

  #delivery_date {
    width: 50%;
  }

  .date_block {
    width: 100%;
    column-gap: 10px;
  }

  .delivery_date_time {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  
  .table-sku {
    width: 125px;
  }
  
  .form-group p {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }
  
  input[type="email"], input[type="tel"] {
    width: 100%;
  }
  
  .address-container .p-region, 
  .address-container .p-street-address, 
  .address-container .address2 {
    width: 100%;
    margin-left: 0px;
  }
  
  .address-container {
    margin: 1rem 0;
  }
  
  .product-header {
    display: none;
  }
  
  .product-row.first-row {
    border-top: 1px solid #ddd;
  }
  
  .product-header div {
    border: 0;
  }
  
  .product-row .table-row {
    padding: 8px 5px;
  }
  
  .product-row {
    display: grid;
    border-bottom: 1px solid #ddd;
    align-items: center;
    border-right: 1px solid #ddd;
    border-left: 1px solid #ddd;
    grid-template-areas:
    "row-nb sku number delete"
    "product product product delete";
    grid-template-columns: 45px auto 60px 30px;
  }
  
  .table-row {
    border: 0 !important;
  }
  
  .table-column {
    width: 40px;
    grid-area: row-nb;
  }

  .table-sku {
    width: calc(60% - (75px / 2));
    order: 2;
    width: 100%;
    grid-area: sku;
  }

  .table-product {
    width: 100%;
    order: 5;
    width: 100%;
    grid-area: product;
  }

  .table-number {
    width: calc(40% - (75px / 2));
    order: 3;
    width: 100%;
    grid-area: number;
  }

  .table-button {
    width: 35px;
    order: 4;
    width: 100%;
    grid-area: delete;
  }
  
  #productTable2 input[type="text"], 
  #productTable2 input[type="number"] {
    width: 100%;
  }
  
  .agree_checkbox {
    flex-wrap: unset;
  }
  
  span.labelAdresse {
    width: 100%;
  }
  
  .small, small {
    font-size: .725em;
  }
  
  .form-group.survey-field.checkbox .checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 11px;
  }
  
  .form-group.survey-field.checkbox {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .checkbox-container .checkbox-option {
    width: 100%;
  }
  
  .name-input-group, .company-input-group {
    width: 100%;
  }

  .birthday-select-group {
    width: 100%;
  }
}

/* Large Desktop (1400px+) */
@media screen and (min-width: 1400px) {
  h1, .h1 {
    font-size: 40px;
  }
}