/**
Theme Name: Taste of Ink WP
Author:
Author URI:
Description:
Version: 1.0.0
License:
License URI:
Text Domain: astra-child
Template: astra
*/
@font-face{
  font-family: "SharpGroteskPE-Semibold15";
  src: url("/wp-content/uploads/2025/09/sharpgroteskpesmbold-15-webfont.woff2") format("woff2"),
       url("/wp-content/uploads/2025/09/sharpgroteskpesmbold-15-webfont.woff") format("woff");
  font-weight: 700;  
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "SharpGroteskPE-Book20";
  src: url("/wp-content/uploads/2025/09/sharpgroteskpebook-20-webfont.woff") format("woff"),
       url("/wp-content/uploads/2025/09/sharpgroteskpebook-20-webfont.woff2") format("woff2");
  font-weight: 400; 
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "SharpGroteskPE-Medium20";
  src: url("/wp-content/uploads/2025/09/sharpgroteskpemedium-20-webfont.woff") format("woff"),
       url("/wp-content/uploads/2025/09/sharpgroteskpemedium-20-webfont.woff2") format("woff2");
  font-weight: normal;  
  font-style: normal;
  font-display: swap;
}

@media screen and (max-width:800px) {
    .bc-container {
        width:736px!important;
        height:440px!important;
        overflow:hidden;
        max-width:none!important;
    }
}

/** Custom Login **/
.woocommerce .e-my-account-tab__dashboard #customer_login.col2-set .col-2 {
	float:left!important;
}

/* ===== PDP Layout ===== */

.pdp-container>.e-con-inner {
  display: grid!important;
  gap: 24px!important;
}
/* Default: stack (covers < 1440px) */
.pdp-container>.e-con-inner {
  grid-template-columns: 1fr!important;
}

.form-container,
.card-container {
	padding:2%;
	align-content:center;
}
.card-container {
	min-width:900px;
}

/* ≥1440px: right column has min 900px; left fills remaining space */
@media (min-width: 1440px) {
  .pdp-container>.e-con-inner {
    /* left flows to fill whatever space remains after the right takes ≥900px */
    grid-template-columns: minmax(0, 1fr) minmax(900px, 1fr)!important;
    align-items: start!important;
  }
  .form-container  { grid-column: 1; }
  .card-container { grid-column: 2; }
}

/* Optional: tighten stacking behavior specifically for <1400px if you like */
@media (max-width: 1399.98px) {
  .pdp-col { min-width: 0; } /* prevent overflow when stacked */
}



/* ===== Start Card Layout ===== */

#qr-code {}
.bc-name-container,
.bc-position {
  flex: 1;
}

/* ===== Vars (use your brand tokens if you have them) ===== */
:root{
	--bc-brand: var(--e-global-color-primary);         /* deep blue (logo/heads) */
	--bc-accent: var(--e-global-color-accent);        /* teal for @ / phone icons */
	--bc-text: var(--e-global-color-primary);          /* body text */
	--bc-name-size:				50px;
	--bc-title-size: 			18px;
	--bc-title-weight:			600;
	--bc-info-size:				22px;
	--bc-address-line-height:	26px;
	--bc-position-gap:			26px;
}

/* ===== Card frame ===== */
#business-card-preview.bc-container{
	width: 820px!important; 
	aspect-ratio: 1.588/1;
	padding: 60px;
	color: var(--e-global-color-primary);
	border:1px solid var(--e-global-color-primary);
	background:#fff;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow:hidden;
	margin:0 auto;
}

/* ===== Row / Column Formatting ===== */

.bc-top-row,
.bc-bottom-row {
	display: flex;
	/*grid-template-columns: 1fr 1.5fr;*/
	align-items: stretch;
	gap: 50px;
}
.bc-column-left,
.bc-column-right {
	display:flex;
	justify-content: space-between;
	align-content:stretch;
	min-width: 0;  
}
.bc-column-left {
	width: 236px !important;
	margin-right:0;
}
.bc-column-right {
	margin-left:0;
	overflow:hidden;
	min-width: 0!important;  
}
/* ===== Top row: logo + name block ===== */

.bc-logo {
	padding:5px 0 0 12px;
}
.bc-art .bc-logo img{
    display: block;
    width: 220px;
    height: auto;
}

.bc-name-container {
	align-self: start; 
	justify-content: space-between;
	display:flex;
	flex-direction:column;
}

.bc-name{
  	font-weight: 800;
  	font-size: var(--bc-name-size);
  	line-height: 1;
	font-family: "SharpGroteskPE-Semibold15", Sans-Serif;
  	color: var(--e-global-color-primary);
  	letter-spacing: .2px;
}
.bc-name > .inline-creds {
	display: inline!important;
	font-family: "SharpGroteskPE-Book20", Sans-Serif;
  	margin-top: 8px;
  	display: block;
  	align-items: baseline;
  	text-transform: uppercase;
  	letter-spacing: .12em;
  	font-weight: var(--bc-title-weight);
  	font-size: var(--bc-title-size);
	line-height:20px;
}
.bc-title{
	font-family: "SharpGroteskPE-Book20", Sans-Serif;
  	margin-top: 8px;
  	display: block;
  	grid-auto-flow: column;
  	gap: 12px 0;
  	align-items: baseline;
  	text-transform: uppercase;
  	letter-spacing: .12em;
  	font-weight: var(--bc-title-weight);
  	font-size: var(--bc-title-size);
	line-height:20px;
}



/* ===== Bottom row: QR left / info right ===== */

.bc-qrcode{
  width: 236px !important;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
	overflow:hidden;
}
.bc-qrcode img {
	max-width: 236px !important;
    width: 100% !important;
    height: auto !important;
    margin: 0;
}

/* ===== Info column ===== */
.bc-position{ 
	display: grid; 
	gap: var(--bc-position-gap); 
}

.bc-info{ 
	display: grid; 
	gap: var(--bc-position-gap); 
	font-family: "SharpGroteskPE-Book20", Sans-Serif;
}

/* Email line */

.bc-email > span {
  display: flex;
  align-items: start;
  gap: 0;      /* replaces &nbsp; spacing */
  min-width: 0;    /* critical in flex layouts */
}

.bc-email .bc-icon {
  flex: 0 0 auto;
}

/* Email text takes remaining width and can shrink */
#preview-email {
  flex: 1 1 auto;
  min-width: 0;          /* let it get narrower than content */
  display: block;        /* so width applies cleanly */
  width: 100%;
}

/* Priming (your fitter adds this class automatically) */
#preview-email.bc-fit-primed {
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}


.bc-email{
  font-size: var(--bc-info-size);
  line-height: 1.3;
}
.bc-email .bc-icon{
  color: var(--e-global-color-accent);
  font-weight: 400;
  margin-right: 6px;
}

/* Phones — works with your JS stack/grid classes */
#preview-phones{
  display: grid;
  gap: 6px;
  font-size: var(--bc-info-size);
  line-height: 1.2;
}
#preview-phones.stack .bc-phone-row{
  display:block;
}
#preview-phones.grid .bc-phone-row{
  	display:flex; 
	gap: 28px; 
	align-items: baseline; 
	flex-wrap: wrap;
}
#preview-phones .bc-phone{ 
	min-width:190px;
	width:190px;
}
#preview-phones .bc-icon{ 
	color: var(--e-global-color-accent);
    font-weight: normal;
    margin-right: 4px;
	display: inline-block;
    align-content: end;
    text-align: right;
    margin-left: -5px;
}
#preview-phones.stack .bc-icon{
	margin-left: 0px;
	width: 30px !important;
}
#preview-phones.grid .bc-icon{
	margin-left: -5px;
	width: 26px !important;
}
/* phones: two-row grid vs stacked */
#preview-phones.grid .bc-phone-row {
	  gap: 28px;
}
#preview-phones.bc-phones-grid .bc-phone-row,
#preview-phones.bc-phones-grid .bc-phone-row-1 {
	  gap: 6px;
}
#preview-phones.grid .bc-phone-row,
#preview-phones.bc-phones-grid .bc-phone-row,
#preview-phones.bc-phones-grid .bc-phone-row-1{  /* old name support */
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap; /* prevent wrapping onto next line */
}

#preview-phones.stack .bc-phone-row,
#preview-phones.bc-phones-stack .bc-phone-row,
#preview-phones.bc-phones-stack .bc-phone-row-1 { /* old name support */
  display: block;
}

/* keep labels + numbers together */
#preview-phones .bc-phone { white-space: nowrap; }



/* Company + Address */

.bc-address-wrapper div {
	margin-top: 0; 
	font-family: "SharpGroteskPE-Book20", Sans-Serif;
	font-weight:500;
	font-size: var(--bc-info-size);
	line-height:var(--bc-address-line-height);
}

.bc-company{
  margin-top: 8px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--e-global-color-primary);
}

.bc-address{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;   /* space between line1 and c/s/z when on same row */
  row-gap: 2px;
	min-width:0;
}

.bc-address-line1 {
	white-space:nowrap!important;
	overflow:hidden!important;
	max-width: none !important;
	min-width:0!important;
}

/* keep each chunk intact */

/* Priming: single-line measurement + safe box sizing */
.bc-fit-primed {
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.bc-column-right,
.bc-info,
.bc-address-wrapper,
.bc-address,
.bc-email,
#preview-address {
  min-width: 0; 
}

/* Let flex/grid children in this branch actually shrink */
.bc-column-right,
.bc-info,
.bc-address-wrapper,
.bc-address,
.bc-email,
#preview-address { min-width: 0; }


/* Treat these as full-width one-line blocks */

#preview-email.bc-fit-primed {
  display:inline;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

#preview-title.bc-fit-primed,
.bc-address-line1.bc-fit-primed,
.bc-csz.bc-fit-primed {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

/* Styling when a line shrinks */
.bc-scaled { 
  letter-spacing: -0.02em;   /* tune per line if you like */
  font-stretch: condensed;   /* if your font supports it */
}

/* Optional: per-field tweaks */
#preview-title.bc-scaled { letter-spacing: -0.015em; }
#preview-email.bc-scaled { letter-spacing: -0.01em; }

/* If ANY line has been scaled, you can globally nudge spacing on the right column */
.bc-scaled-any .bc-right-column { /* line-height: 1.05; */ }


/** These are Maybe Styles
#preview-email {
	display: inline!important;
}
#preview-title,
#preview-address,
.bc-address-line1, 
.bc-csz {
	display: block!important;
}
#preview-title,
#preview-email,
#preview-address,
.bc-address-line1, 
.bc-csz {
  width: 100%!important;
  white-space: nowrap!important;
  overflow: hidden!important;
  box-sizing: border-box!important;
}

.bc-scaled {
	letter-spacing:-0.02em;
	font-stretch: condensed;
	transform: translateY(0.5px);
}

/* If the row is tight, .bc-csz naturally wraps to the next line.
   No JS needed; short addresses stay one line, long ones break before city. */

.bc-address-line1::after {
  content: "";
  white-space: normal;
}
.bc-address-line1{ /* comma handled by your HTML/JS; no pseudo needed */ }
.bc-city::before{ content:" "; }   /* ensure space before City if needed */
.bc-state::before{ content:" "; }
.bc-zip::before{ content:" "; }

/* ===== Fine-tuning rhythm ===== */
.bc-name + .bc-title{}
.bc-email + #preview-phones{ margin-top: 2px; }
#preview-phones + .bc-address-wrapper{ 
}

#preview-credentials,
#preview-title {
	display:block;	
}

/* ===== Responsive: stack columns on narrow canvases ===== */
@media (max-width: 820px){
  .bc-top-row{ grid-template-columns: 1fr; text-align:center; }
  .bc-bottom-row{ grid-template-columns: 1fr; }
  .bc-qrcode{ margin: 0 auto; }
  .bc-title{ grid-auto-flow: row; justify-items:center; }
}
/* ===== Hide empty nodes & tidy punctuation ===== */

/* generic “hide when empty” rule */
#preview-credentials:empty,
#preview-title:empty,
.bc-address span:empty,
.bc-company:empty,
.bc-email:empty,
#preview-phones:empty,
#preview-phones .bc-phone:empty,
#preview-phones .bc-phone-row:empty {
  display: none !important;
  visibility: hidden !important;
}

/* remove orphan commas and spaces when city/state/zip missing */
.bc-address:has(.bc-city:empty) .bc-city::before,
.bc-address:has(.bc-state:empty) .bc-state::before,
.bc-address:has(.bc-zip:empty) .bc-zip::before {
  content: "" !important;
}

/* bonus: collapse leftover gaps when an entire line disappears */
.bc-email:empty + #preview-phones,
#preview-phones:empty + .bc-address-wrapper {
  margin-top: 0;
}



/** QR Code Toggle Switch **/

/* Wrap a class on the field itself for targeting */
.gfield.hide-qr-toggle .gfield_checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* Hide the default checkbox input */
.gfield.hide-qr-toggle input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  left: 0;
  width: 0;
  height: 0;
}

/* Custom slider look */
.gfield.hide-qr-toggle label {
  position: relative;
  padding-left: 52px; /* space for the slider */
  line-height: 24px;
  font-size: 15px;
  color: #222;
  cursor: pointer;
}

/* Slider track */
.gfield.hide-qr-toggle label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 24px;
  background-color: #1d7f8e;
  border-radius: 34px;
  transition: background-color 0.3s;
}

/* Slider knob */
.gfield.hide-qr-toggle label::after {
  content: "";
  position: absolute;
  left: 20px;
	transform: translateX(-2px);
  top: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* When checked */
.gfield.hide-qr-toggle input[type="checkbox"]:checked + label::before {
  background-color: #ccc; /* your brand teal */
}

.gfield.hide-qr-toggle input[type="checkbox"]:checked + label::after {
  transform: translateX(-22px);
}

.gfield.hide-qr-toggle .gfield_checkbox {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.gfield.hide-qr-toggle label {
  padding-left: 0;
  padding-right: 52px;
}
.gfield.hide-qr-toggle label::before,
.gfield.hide-qr-toggle label::after {
  right: 0;
  left: auto;
}

/* Smooth fade */
#qr-code #qr-code-img,
#qr-code #qr-code-link { transition: opacity .2s ease; }

/* When hidden: force opacity to 0 and disable clicks */
#qr-code.qr-hidden #qr-code-img,
#qr-code.qr-hidden #qr-code-link {
  opacity: 0 !important;
  pointer-events: none;
}

