/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
/* Global body + headings */
body, input, textarea, select, button, label, .acf-label label {
    font-family: 'Inter', sans-serif !important;
}

h1, h2, h3, h4, h5, .acf-label label, .sgao-btn-primary {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Remove old html sans-serif */
html {
    font-family: 'Inter', sans-serif;
}

body {
  margin: 0!important;
  font-family: 'Inter', sans-serif;
}

/* =========================
   SGAO Inventory Form UI
   Applies to ACF form markup
   ========================= */

.sgao-form-page {
  background: #f5f4f3;
  padding: 18px;
  font-family: 'Inter', sans-serif;
}

/* Card wrapper */
.sgao-form-page .acf-form {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 18px;
  padding: 18px;
}

/* Remove default ACF boxy look */
.sgao-form-page .acf-fields {
  border: 0 !important;
  background: transparent !important;
}

/* Section headings */
.sgao-form-page .acf-field > .acf-label label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #111;
}

.sgao-form-page .acf-field {
  padding: 10px 0 !important;
  border-top: 0 !important;
}

/* Inputs */
.sgao-form-page .acf-input input[type="text"],
.sgao-form-page .acf-input input[type="number"],
.sgao-form-page .acf-input input[type="date"],
.sgao-form-page .acf-input textarea,
.sgao-form-page .acf-input select {
  width: 100%;
  border: 1px solid #e6e6e6 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  font-family: 'Inter', sans-serif;
  background: #fff !important;
  outline: none !important;
  box-shadow: none !important;
}

.sgao-form-page .acf-input input:focus,
.sgao-form-page .acf-input textarea:focus,
.sgao-form-page .acf-input select:focus {
  border-color: #0a7a70 !important;
}

/* Title field (WP title input) */
.sgao-form-page input#acf-_post_title,
.sgao-form-page input#title {
  width: 100%;
  border: 1px solid #e6e6e6 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  font-family: 'Inter', sans-serif;
}

/* Make main form layout nicer */
@media (min-width: 900px) {
  .sgao-form-page .acf-field[data-name="item_details"] > .acf-input > .acf-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .sgao-form-page .acf-field[data-name="item_details"] > .acf-label {
    margin-bottom: 10px;
  }
}

/* Group / Repeater container styling */
.sgao-form-page .acf-field[data-type="group"] > .acf-input,
.sgao-form-page .acf-field[data-type="repeater"] > .acf-input {
  background: #fafafa;
  border: 1px solid #eee;
  padding: 14px;
}

/* Repeater table cleanup */
.sgao-form-page .acf-repeater .acf-table {
  border: 0 !important;
}

.sgao-form-page .acf-repeater .acf-row {
  background: #fff;
  border: 1px solid #eee;
  margin-bottom: 12px;
  overflow: hidden;
}

td.acf-fields {
    padding: 16px !important;
}

/*.sgao-form-page .acf-repeater .acf-row-handle {
  background: #f6f6f6 !important;
  border-right: 1px solid #eee !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
}*/

/* Repeater add row button */
.sgao-form-page .acf-repeater .acf-actions .button,
.sgao-form-page .acf-button,
.sgao-form-page .button {
  border-radius: 12px !important;
  font-family: 'Inter', sans-serif;
}

/* Primary submit button */
.sgao-form-page .acf-form-submit input[type="submit"] {
  background: #0a7a70 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-weight: 900 !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer !important;
}

.sgao-form-page .acf-form-submit input[type="submit"]:hover {
  filter: brightness(0.95);
}

/* Inventory Per SKU grid */
@media (min-width: 900px) {
  .sgao-form-page .acf-field[data-name="inventory_per_sku"] .acf-fields {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 14px;
  }
  .sgao-form-page .acf-field[data-name="inventory_per_sku"] .acf-field[data-name="product_batch"] {
    grid-column: 1 / -1;
  }
}

/* Labels for sub-sections */
.sgao-form-page .acf-field[data-name="inventory_per_sku"] > .acf-label label,
.sgao-form-page .acf-field[data-name="product_batch"] > .acf-label label {
  font-size: 14px;
  font-weight: 900;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Reduce required asterisk size */
.sgao-form-page .acf-required {
  font-size: 12px;
}

/* Hide instructions slightly */
.sgao-form-page .acf-field .description {
  opacity: 0.65;
  font-size: 12px;
}

/* Overlay & notice boxes */
.sgao-notice {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.sgao-notice-box {
  background: #fff;
  width: 400px;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: sgaoPop .2s ease;
  font-family: 'Inter', sans-serif;
}

@keyframes sgaoPop {
  from { transform: scale(.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.sgao-notice-box h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
}

.sgao-notice-box p {
  margin: 0 0 16px;
  opacity: .75;
}

/* Notice actions / buttons */
.sgao-notice-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.sgao-btn-primary {
  background: #0a7a70;
  color: #fff;
  border: 0;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.sgao-btn-secondary {
  background: #eee;
  border: 0;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* Locked / disabled fields */
.sgao-field-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.sgao-field-disabled .sgao-dup-inline {
  pointer-events: auto;
  opacity: 1;
}

.sgao-locked {
  background: #f5f5f5 !important;
  cursor: not-allowed !important;
}


/*Jonathan*/

/*
.acf-fields.-border {
    border: #d0d0d0 solid 1px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}*/

/* =========================
   PAGE BACKGROUND
========================= */
.sgao-form-page {
  background: #F6F8FB;
  min-height: 100vh;
  padding-bottom: 140px;
}

/* =========================
   FORM CONTAINER CARD
========================= */
.sgao-form-container .acf-form {
  /*max-width: 720px;*/
  margin: 0 auto;
}

.acf-form {
  background: transparent;
}

/* =========================
   SECTION HEADERS
========================= */
.acf-field-group > .acf-label label,
.acf-field-group .acf-label label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6B7A99;
}

/* =========================
   INPUT STYLE (underline style)
========================= */
.acf-form input[type="text"],
.acf-form input[type="number"],
.acf-form select,
.acf-form textarea {
  border: none !important;
  border-bottom: 2px solid #E2E6EF !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 10px 0 !important;
  font-size: 15px;
  transition: all .2s ease;
}

.acf-form input:focus,
.acf-form select:focus,
.acf-form textarea:focus {
  border-bottom: 2px solid #2D5BFF !important;
  box-shadow: none !important;
  outline: none;
}

/* =========================
   FIELD CARD (Item Details box)
========================= */
.acf-field-group,
.acf-fields > .acf-field {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(25, 45, 100, 0.05);
  border: 1px solid #EEF1F6;
}

/* =========================
   REPEATER (SKU CARD)
========================= */
.acf-repeater .acf-row {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #EEF1F6;
  box-shadow: 0 6px 18px rgba(25, 45, 100, 0.04);
  margin-bottom: 20px;
  padding: 20px;
}

.acf-repeater .acf-row-handle {
  background: transparent;
  border: none;
}

/* =========================
   ADD ROW BUTTON
========================= */
.acf-button {
  background: #EDF2FF !important;
  color: #2D5BFF !important;
  border-radius: 10px !important;
  padding: 10px 18px !important;
  font-weight: 500;
  border: none !important;
}

.acf-button:hover {
  background: #E0E7FF !important;
}

/* =========================
   SUBMIT BUTTON AREA
========================= */
.acf-form-submit {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #FFFFFF;
  padding: 20px 40px;
  border-top: 1px solid #EAEFF7;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.04);
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 999;
}

/* PRIMARY BUTTON (Save Item) */
.acf-form-submit input[type="submit"] {
  background: linear-gradient(90deg, #3A66F7, #2D5BFF);
  color: #FFFFFF;
  border: none;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  min-width: 280px;
  transition: all .2s ease;
  box-shadow: 0 8px 18px rgba(45,91,255,0.25);
}

.acf-form-submit input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(45,91,255,0.35);
}

/* OPTIONAL: SAVE AS DRAFT STYLE */
.sgao-draft-btn {
  background: #EEF1F6;
  color: #5C6B8A;
  border-radius: 14px;
  padding: 16px 40px;
  font-weight: 600;
  border: none;
  min-width: 280px;
}

/* =========================
   SUCCESS MESSAGE
========================= */
.sgao-save-notice {
  background: #E9F7EF;
  color: #1F9254;
  padding: 14px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* =========================
   MODAL STYLE
========================= */
.sgao-form-modal {
  background: #F6F8FB;
  padding: 40px;
}


.acf-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: #EDF2FF;
  color: #2D5BFF !important;

  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;

  text-decoration: none !important;
  border: 1px solid transparent;

  transition: all 0.2s ease;
}

/* Hover */
.acf-actions a:hover {
  background: #E0E7FF;
  transform: translateY(-1px);
}

/* Active */
.acf-actions a:active {
  transform: translateY(0);
}


.acf-field.acf-field-text.acf-field--post-title.is-required {
    background-color: transparent;
    box-shadow: none ! Important;
    border: 0px;
}


.acf-field-group, .acf-fields > .acf-field {
  border:none;
  border-radius: 0!important;
  box-shadow: none; 
  background-color: transparent;
}

.sgao-form-page input#acf-_post_title, .sgao-form-page input#title{
  border-radius: 4px!important;
}

.sgao-form-page .acf-input input[type="text"], .sgao-form-page .acf-input input[type="number"], .sgao-form-page .acf-input input[type="date"], .sgao-form-page .acf-input textarea, .sgao-form-page .acf-input select {
    border-radius: 4px!important;
}


/*Page Inventory Overview CSS*/
.sgao-app{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:calc(100vh - 80px);
  background:#f5f4f3
}

.sgao-sidebar{
  background:#fff;
  border:1px solid #eee;
  padding:22px;
  border-radius:18px;
  margin:18px
}

.sgao-nav a{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  color:#222;
  margin:6px 0
}

.sgao-nav a.active{
  background:#e7f4f1;
  color:#0a7a70;
  font-weight:700
}

.sgao-main{ padding:18px }

.sgao-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:10px 0 18px
}

.sgao-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(170px,1fr));
  gap:14px;
  margin-bottom:16px
}

.sgao-card{
  background:#fff;
  border-radius:18px;
  padding:16px;
  border:1px solid #eee
}

.sgao-card .label{
  opacity:.65;
  font-size:14px
}

.sgao-card .value{
  font-size:34px;
  font-weight:800;
  margin-top:6px
}

.sgao-panel{
  background:#fff;
  border-radius:22px;
  padding:16px;
  border:1px solid #eee
}

.sgao-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px
}

.sgao-btn{
  background:#0a7a70;
  color:#fff;
  border:0;
  border-radius:12px;
  padding:10px 14px;
  font-weight:800;
  cursor:pointer
}

table.sgao-table{
  width:100%;
  border-collapse:collapse
}

.sgao-table th,
.sgao-table td{
  border:1px solid #e2e2e2;
  padding:10px;
  font-size:13px;
  text-align:center
}

.sgao-actions{
  display:flex;
  gap:10px;
  justify-content:center
}

.sgao-iconbtn{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid #ddd;
  background:#fff;
  cursor:pointer
}

/* Modal */

.sgao-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.45);
  z-index:9999;
  padding:18px
}

.sgao-modal.open{ display:flex }

.sgao-modal-box{
  width:min(1100px,96vw);
  height:min(88vh,900px);
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.25)
}

.sgao-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid #eee
}

.sgao-modal-title{ font-weight:900 }

.sgao-close{
  border:0;
  background:#f3f3f3;
  border-radius:12px;
  padding:8px 12px;
  cursor:pointer
}

.sgao-iframe{
  width:100%;
  height:calc(100% - 52px);
  border:0;
  background:#f5f4f3
}
/*End*/

