/* BSC Web V006-FIX47 — global Cooper corner system
   Project rule: all new UI surfaces and rectangular controls use the same 18px radius.
   Explicit exceptions: circular controls, status pills, switches, voucher decorative frame and diamond ornaments. */
:root{
  --cooper-ui-radius:18px;
}

/* Public web — buttons and interactive surfaces */
.site-header .reserve-link,
.hero-actions a,
.contact-actions a,
.voucher-buy,
.cb-submit,
.cb-result-close{
  border-radius:var(--cooper-ui-radius) !important;
}

/* Public voucher/order modals */
.cb-dialog,
.cb-field input:not([type="checkbox"]):not([type="radio"]),
.cb-field textarea,
.cb-field select,
.cb-payment-note,
.cb-message,
.cb-bank,
.cb-result-qr,
.cb-result-details{
  border-radius:var(--cooper-ui-radius) !important;
}

/* Shared Cooper confirmation / alert modal */
.cooper-dialog,
.cooper-dialog-detail,
.cooper-dialog-button{
  border-radius:var(--cooper-ui-radius) !important;
}

/* Administration login */
.login-card,
.login-card .error,
.login-card input:not([type="checkbox"]):not([type="radio"]),
.login-card button{
  border-radius:var(--cooper-ui-radius) !important;
}
.login-card{
  overflow:hidden;
}

/* Administration dashboard */
.admin-dashboard .panel,
.admin-dashboard .cms-heading,
.admin-dashboard #notice:not(:empty),
.admin-sidebar-nav button,
.admin-web-button,
.admin-menu-toggle,
.admin-logout-button,
.admin-nav-icon,
.admin-dashboard #orders .order-actions button,
.admin-dashboard #orders .order-dedication{
  border-radius:var(--cooper-ui-radius) !important;
}

/* CMS / settings / media UI */
.cms-group,
.cms-group>header,
.cms-fields input:not([type="checkbox"]):not([type="radio"]),
.cms-fields textarea,
.cms-fields select,
.cms-checkbox,
.cms-actions button,
.media-upload-card,
.media-upload-card input:not([type="checkbox"]):not([type="radio"]),
.media-upload-card button,
.media-card,
.media-card input:not([type="checkbox"]):not([type="radio"]),
.media-card-actions button,
.empty-media,
.marketing-form,
.marketing-card,
.marketing-field input:not([type="checkbox"]):not([type="radio"]),
.marketing-field textarea,
.marketing-field select,
.marketing-actions button,
.marketing-note,
.media-admin-block,
.media-slot-card,
.media-slot-preview,
.media-config-actions button,
.media-library-search input{
  border-radius:var(--cooper-ui-radius) !important;
}

/* Keep intentional shapes untouched */
.order-status-pill,
.marketing-switch>span,
.media-used-badges span,
.media-summary-toggle,
.cb-close{
  border-radius:999px !important;
}

/* Voucher ornamental diamonds/chamfers must remain square/diamond */
.voucher-ornament,
.site-header .reserve-link::before,
.site-header .reserve-link::after,
.hero-actions a::before,
.hero-actions a::after,
.contact-actions a::before,
.contact-actions a::after,
.voucher-buy::before,
.voucher-buy::after,
.cb-submit::before,
.cb-submit::after,
.cooper-dialog-button.primary::before,
.cooper-dialog-button.primary::after{
  border-radius:2px !important;
}

@media(max-width:620px){
  :root{--cooper-ui-radius:18px}
  .cb-dialog,
  .cooper-dialog{
    border-radius:var(--cooper-ui-radius) !important;
  }
}

/* BSC Web V006-FIX47 — clean cross-browser font inside form controls
   Project rule: values typed/selected inside form controls always use the native UI sans-serif stack.
   Brand/display fonts remain reserved for headings, labels and branded buttons. */
input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
textarea,
select,
option{
  font-family:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif !important;
  font-weight:400 !important;
  font-style:normal !important;
  font-variant:normal !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

input::placeholder,
textarea::placeholder{
  font-family:inherit !important;
  font-weight:400 !important;
  font-style:normal !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}

/* BSC Web V007-FIX06 — finish the global 18px Cooper radius in admin forms.
   Vzhled voucheru and Nastaveni use legacy markup outside .cms-fields, so they
   need explicit selectors here. Range sliders and checkboxes intentionally keep
   their native/special shape. */
.template-fields input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.template-fields textarea,
.template-fields select,
#settings-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
#settings-form textarea,
#settings-form select{
  border-radius:var(--cooper-ui-radius) !important;
}

#settings-form fieldset{
  border-radius:var(--cooper-ui-radius) !important;
}

/* BSC Web V007-FIX07 — finish admin control consistency. */
/* Voucher-template and Settings buttons use the same Cooper radius as the rest of admin. */
.templates-panel button,
#settings-form button,
.design-upload input[type="file"]{
  border-radius:var(--cooper-ui-radius) !important;
}

/* Native file picker button inside voucher design upload. */
.design-upload input[type="file"]::file-selector-button{
  border-radius:var(--cooper-ui-radius) !important;
  border:1px solid #9eafb7;
  background:#fff;
  color:#003551;
  padding:7px 12px;
  margin-right:8px;
  cursor:pointer;
}

/* Keep voucher fields inside their grid cells; Popis must never grow wider horizontally. */
.template-fields>label{
  min-width:0;
}
.template-fields input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.template-fields textarea,
.template-fields select{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
.template-fields textarea[name="description"]{
  resize:vertical !important;
}

/* BSC Web V007-FIX08 — Odkazy: reservation-new-window must match the neighbouring text fields.
   It occupies the full second column like E-mail, but only the control height (not label+control height). */
#links-editor .cms-checkbox-compact{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  min-height:43px !important;
  height:43px !important;
  box-sizing:border-box !important;
  align-self:end !important;
  justify-self:stretch !important;
  grid-template-columns:18px minmax(0,1fr) !important;
  align-items:center !important;
  padding:0 13px !important;
  margin:0 !important;
}



/* BSC Web V007-FIX09 — finish rounded voucher-template blocks and make Popis same height as Název. */
.design-upload,
.saved-design,
.template-layout-note,
.template-list button,
.voucher-preview,
.voucher-preview-art{
  border-radius:var(--cooper-ui-radius) !important;
}



/* BSC Web V007-FIX10 — vertically center checkbox and label text in Odkazy compact checkbox. */
#links-editor .cms-checkbox-compact{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  line-height:1 !important;
}

#links-editor .cms-checkbox-compact input[type="checkbox"]{
  margin:0 !important;
  flex:0 0 auto !important;
  align-self:center !important;
}



/* BSC Web V007-FIX12 — Popis uses the same input control as Název, guaranteeing identical height. */
.template-fields input[name="name"],
.template-fields input[name="description"]{
  min-height:43px !important;
  height:43px !important;
  box-sizing:border-box !important;
}

/* HairSoft Bridge pairing and export status. */
.hairsoft-bridge-settings{display:grid;gap:18px;}
.hairsoft-bridge-settings .hairsoft-toggle{
  display:flex !important;
  align-items:center;
  gap:16px;
  line-height:1.2;
}
.hairsoft-bridge-settings .hairsoft-toggle input{
  width:18px !important;
  height:18px !important;
  flex:0 0 auto;
}
.hairsoft-toggle-card{
  min-height:74px;
  margin:0;
  padding:18px 22px;
  border:1px solid #d8cbb9;
  border-radius:var(--cooper-ui-radius);
  background:#fffaf0;
}
.hairsoft-toggle-card span{
  color:#243a52;
  font-size:1.05rem;
  font-weight:500;
}
.hairsoft-auto-send-card{align-items:flex-start !important;}
.hairsoft-auto-send-card input{margin-top:2px;}
.hairsoft-auto-send-card span{display:grid;gap:5px;}
.hairsoft-auto-send-card strong{font-size:1rem;font-weight:700;color:#243a52;}
.hairsoft-auto-send-card small{font-size:.82rem;font-weight:400;line-height:1.45;color:#6d7882;}
.hairsoft-bridge-status{
  margin:0;
  padding:18px 22px;
  border:1px solid #d3d7db;
  border-radius:var(--cooper-ui-radius);
  background:#f7f9fa;
  color:#344b62;
  line-height:1.5;
}
.hairsoft-bridge-status.is-ok{
  border-color:#8fb8a6;
  background:#f1f8f4;
}
.hairsoft-bridge-status.is-loading{
  color:transparent;
  position:relative;
}
.hairsoft-bridge-status.is-loading::after{
  content:"";
  display:block;
  width:48%;
  min-width:190px;
  max-width:320px;
  height:16px;
  border-radius:999px;
  background:linear-gradient(90deg,#eef2f4 0%,#dde5ea 50%,#eef2f4 100%);
}
.hairsoft-pairing{
  display:grid;
  gap:14px;
  margin-top:2px;
}
.hairsoft-pairing[hidden]{display:none !important;}
.hairsoft-pairing-text{
  display:block;
  color:#243a52;
  font-size:1rem;
  font-weight:500;
}
.hairsoft-pairing-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
}
#hairsoft-pairing-code{
  width:100%;
  min-height:56px;
  padding:0 22px;
  border:2px solid #c8cfce;
  border-radius:18px;
  background:#fff;
  color:#243a52;
  font-size:1rem;
  letter-spacing:.18em;
  font-variant-numeric:tabular-nums;
  outline:none;
  box-sizing:border-box;
}
#hairsoft-pairing-code:focus{
  border-color:#183656;
  box-shadow:0 0 0 3px rgba(24,54,86,.10);
}
.hairsoft-connection-dialog #hairsoft-pair,
.hairsoft-connection-dialog #hairsoft-disconnect{
  min-height:56px;
  padding:0 26px;
  border-radius:18px;
  font-size:1rem;
  font-weight:700;
}
.hairsoft-connection-dialog #hairsoft-pair{
  border:2px solid #183656;
  background:#183656;
  color:#fff;
  box-shadow:0 5px 0 rgba(38,28,21,.12);
}
.hairsoft-connection-dialog #hairsoft-pair:hover{background:#244c68;border-color:#244c68;transform:translateY(-1px);}
.hairsoft-connection-dialog #hairsoft-pair:active{transform:translateY(2px);box-shadow:0 2px 0 rgba(38,28,21,.12);}
.hairsoft-connection-dialog #hairsoft-pair:disabled{cursor:wait;opacity:.78;transform:none;}
.hairsoft-connection-dialog #hairsoft-pair.is-working{min-width:154px;}
.hairsoft-pair-feedback{margin:0;padding:11px 14px;border-radius:14px;font-size:.88rem;line-height:1.4;}
.hairsoft-pair-feedback.is-working{background:#eef3f6;color:#40586b;}
.hairsoft-pair-feedback.is-success{background:#edf7f2;color:#346251;border:1px solid #a9cfbd;}
.hairsoft-pair-feedback.is-error{background:#fff0f0;color:#8e2c31;border:1px solid #daa2a6;}
.hairsoft-bridge-actions{margin-top:2px;}
.hairsoft-connection-dialog #hairsoft-disconnect{
  border:2px solid #b7bec4;
  background:#fff;
  color:#30485e;
}
.hairsoft-connection-dialog #hairsoft-disconnect:hover{border-color:#8f98a1;background:#f8fafb;}
.order-action-hairsoft{font-weight:700;}
.order-status-hairsoft-imported{font-weight:700;}
.order-status-hairsoft-failed{font-weight:700;}

/* BSC Web V007-FIX14 — HairSoft pairing moved from main Settings to Vouchery > Propojení modal. */
.hairsoft-connection-dialog{max-width:620px;}
.hairsoft-connection-dialog .admin-order-dialog-body.is-preparing{opacity:0;}
@media(max-width:640px){
  .hairsoft-pairing-row{grid-template-columns:1fr;}
  .hairsoft-connection-dialog{max-width:none;}
  .hairsoft-connection-dialog #hairsoft-pair,
  .hairsoft-connection-dialog #hairsoft-disconnect{width:100%;}
}


/* BSC Web V007-FIX16 — complete HairSoft configuration lives in Vouchery > Propojení. */
.hairsoft-connection-dialog{max-width:900px;}
.hairsoft-config{margin-top:4px;}
.hairsoft-config-form{display:grid;gap:18px;padding-top:4px;border-top:1px solid #ddd5c8;}
.hairsoft-config-heading{display:grid;gap:4px;padding-top:14px;}
.hairsoft-config-heading>span{color:#b33842;font-size:.76rem;font-weight:800;letter-spacing:.14em;}
.hairsoft-config-heading>strong{color:#243a52;font-family:"Bebas Neue",Arial Narrow,sans-serif;font-size:1.65rem;letter-spacing:.02em;}
.hairsoft-config-heading>p{margin:0;color:#687582;font-size:.9rem;line-height:1.5;}
.hairsoft-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.hairsoft-config-grid label,.hairsoft-template-map label{display:grid;gap:8px;color:#243a52;font-weight:600;}
.hairsoft-config-grid select,.hairsoft-template-map select,.hairsoft-template-map input{
  width:100%;min-height:50px;box-sizing:border-box;padding:0 15px;border:2px solid #c8cfce;border-radius:18px;background:#fff;color:#243a52;font-size:.95rem;outline:none;
}
.hairsoft-config-grid select:focus,.hairsoft-template-map select:focus,.hairsoft-template-map input:focus{border-color:#183656;box-shadow:0 0 0 3px rgba(24,54,86,.10);}
.hairsoft-config-subtitle{margin-top:2px;color:#243a52;font-weight:800;font-size:.92rem;}
.hairsoft-payment-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.hairsoft-template-maps{display:grid;gap:12px;}
.hairsoft-template-map{display:grid;gap:12px;padding:16px;border:1px solid #d9d8d2;border-radius:18px;background:#fff;}
.hairsoft-template-map-title{display:flex;justify-content:space-between;gap:16px;align-items:baseline;}
.hairsoft-template-map-title strong{color:#243a52;font-size:1rem;}
.hairsoft-template-map-title span{color:#6d7984;font-size:.82rem;white-space:nowrap;}
.hairsoft-validity-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.hairsoft-validity-hint{color:#74808b;line-height:1.45;}
.hairsoft-config-save{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:2px;}
.hairsoft-config-save>span{color:#74808b;font-size:.82rem;}
.hairsoft-config-save button{min-height:52px;padding:0 24px;border:2px solid #183656;border-radius:18px;background:#183656;color:#fff;font-weight:800;box-shadow:0 5px 0 rgba(38,28,21,.12);cursor:pointer;}
.hairsoft-config-save button:hover{background:#244c68;border-color:#244c68;transform:translateY(-1px);}
.hairsoft-config-wait{display:grid;gap:6px;padding:18px;border:1px solid #d3d7db;border-radius:18px;background:#f7f9fa;color:#344b62;}
.hairsoft-config-wait strong{font-size:.98rem;}.hairsoft-config-wait span{font-size:.86rem;line-height:1.45;color:#687582;}
@media(max-width:760px){
  .hairsoft-config-grid,.hairsoft-payment-grid,.hairsoft-validity-grid{grid-template-columns:1fr;}
  .hairsoft-template-map-title,.hairsoft-config-save{align-items:flex-start;flex-direction:column;}
  .hairsoft-config-save button{width:100%;}
}

/* BSC Web V007-FIX22 — visible HairSoft save feedback + per-template HairSoft mapping. */
.hairsoft-config-save>span.is-success{
  color:#2f6b52;
  font-weight:800;
}
.hairsoft-config-save>span.is-error{
  color:#a64242;
  font-weight:800;
}
.hairsoft-validity-wrap{display:grid;gap:8px;}
.hairsoft-web-only-hint{color:#6f7c87;line-height:1.45;}

.template-hairsoft-card{
  display:grid;
  gap:14px;
  margin-top:6px;
  padding:18px;
  border:1px solid #d8d8d2;
  border-radius:var(--cooper-ui-radius);
  background:#f8f8f4;
}
.template-hairsoft-card.is-linked{
  border-color:#a8c5b7;
  background:#f4faf7;
}
.template-hairsoft-card.is-web-only,
.template-hairsoft-card.is-unavailable{
  background:#f7f8f9;
}
.template-hairsoft-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.template-hairsoft-head>div{display:grid;gap:4px;}
.template-hairsoft-head span{
  color:#b33842;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.14em;
}
.template-hairsoft-head strong{
  color:#243a52;
  font-size:1.03rem;
}
.template-hairsoft-head>b{
  flex:0 0 auto;
  padding:6px 10px;
  border-radius:999px;
  background:#e9edef;
  color:#566776;
  font-size:.76rem;
}
.template-hairsoft-card.is-linked .template-hairsoft-head>b{
  background:#dfeee6;
  color:#2f6b52;
}
.template-hairsoft-card>label,
.template-hairsoft-validity>label{
  display:grid;
  gap:8px;
  color:#243a52;
  font-weight:700;
}
.template-hairsoft-card select,
.template-hairsoft-card input{
  width:100%;
  min-height:48px;
  box-sizing:border-box;
  padding:0 14px;
  border:2px solid #c8cfce;
  border-radius:18px;
  background:#fff;
  color:#243a52;
  font:inherit;
  outline:none;
}
.template-hairsoft-card select:focus,
.template-hairsoft-card input:focus{
  border-color:#183656;
  box-shadow:0 0 0 3px rgba(24,54,86,.10);
}
.template-hairsoft-validity{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.template-hairsoft-card>p{
  margin:0;
  color:#6f7c87;
  font-size:.88rem;
  line-height:1.5;
}
@media(max-width:760px){
  .template-hairsoft-validity{grid-template-columns:1fr;}
  .template-hairsoft-head{align-items:flex-start;flex-direction:column;}
}
