/* Square sale assignment panels and selection controls. */
.square-sale-event-form {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #dce5e1;
  border-radius: 12px;
  background: #fff;
  color: #173a30;
}
.square-sale-event-form .square-sale-event-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.square-sale-event-head > div { min-width: 0; flex: 1; }
.square-sale-event-head strong { font-size: 14px; font-weight: 700; line-height: 1.4; }
.square-sale-event-form .square-sale-event-head p { margin: 3px 0 0; color: #6a7772; font-size: 12px; line-height: 1.5; }
.square-sale-event-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #e1e9e5; border-radius: 9px; background: #f7faf8; color: #477362; }
.square-sale-event-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.square-sale-preview-badge { flex-shrink: 0; padding: 3px 8px; border-radius: 5px; background: #f2f4f3; color: #6a7772; font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.square-sale-event-controls { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(200px, 360px) auto; align-items: end; gap: 12px; }
.square-sale-selection-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 40px; }
.square-sale-selection-count { padding: 6px 10px; margin-right: 4px; border-radius: 6px; background: #f3f5f4; color: #66746e; font-size: 12px; font-weight: 600; white-space: nowrap; }
.has-selection .square-sale-selection-count { background: #e7f2ed; color: #1f6f5b; }
.square-sale-event-form .square-sale-selection-tools button { min-height: 36px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: #356e5b; font-size: 12px; font-weight: 600; }
.square-sale-event-form .square-sale-selection-tools button:hover:not(:disabled) { background: #f0f5f2; }
.square-sale-event-form .square-sale-selection-tools button:disabled { color: #9ba6a0; cursor: default; opacity: 1; }
.square-sale-event-form .square-sale-event-field { display: grid; gap: 6px; min-width: 0; margin: 0; color: #61736a; font-size: 11px; font-weight: 600; }
.square-sale-event-form select { width: 100%; min-width: 0; max-width: 100%; height: 40px; margin: 0; padding: 0 32px 0 12px; border: 1px solid #cbd8d1; border-radius: 7px; background-color: #fff; color: #234a3d; font-size: 12px; font-weight: 500; text-overflow: ellipsis; }
.square-sale-event-form .square-sale-event-submit { height: 40px; min-height: 40px; margin: 0; padding: 0 18px; border: 1px solid #1f6f5b; border-radius: 7px; background: #1f6f5b; color: #fff; font-size: 12px; font-weight: 600; box-shadow: none; white-space: nowrap; }
.square-sale-event-form .square-sale-event-submit:hover:not(:disabled) { background: #175a49; }
.square-sale-event-form .square-sale-event-submit:disabled { background: #eef2ef; border-color: #e2e8e4; color: #899a90; opacity: 1; cursor: not-allowed; }
.square-sale-event-form :is(select, button):focus-visible { outline: 2px solid #1f6f5b; outline-offset: 3px; }
.square-sale-event-foot { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 12px; color: #7b8881; font-size: 11px; line-height: 1.5; }
.square-sale-event-form [data-square-event-status] { margin: 12px 0 0; min-height: 0; font-size: 12px; line-height: 1.5; }
.square-sale-event-form [data-square-event-status]:empty { display: none; }
.square-sale-event-form.is-single-sale .square-sale-event-controls { grid-template-columns: minmax(0, 1fr) auto; }
.square-sale-selection { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.square-sale-selection input { width: 18px; height: 18px; margin: 0; accent-color: #1f6f5b; cursor: pointer; }
.square-sale-selection input:focus-visible { outline: 2px solid #1f6f5b; outline-offset: 4px; }
@media (min-width: 901px) {
  .square-sale-event-form:not(.is-single-sale) { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(200px, 360px) auto; align-items: center; gap: 10px 12px; }
  .square-sale-event-form:not(.is-single-sale) .square-sale-event-head { grid-column: 1; grid-row: 1; margin: 0 16px 0 0; }
  .square-sale-event-form:not(.is-single-sale) .square-sale-event-controls { display: contents; }
  .square-sale-event-form:not(.is-single-sale) .square-sale-selection-tools { grid-column: 1; grid-row: 2; }
  .square-sale-event-form:not(.is-single-sale) .square-sale-event-field { grid-column: 2; grid-row: 1; }
  .square-sale-event-form:not(.is-single-sale) .square-sale-event-submit { grid-column: 3; grid-row: 1; align-self: end; }
  .square-sale-event-form:not(.is-single-sale) .square-sale-event-foot { grid-column: 2 / -1; grid-row: 2; justify-content: flex-end; margin: 0; }
  .square-sale-event-form:not(.is-single-sale) [data-square-event-status] { grid-column: 1 / -1; margin: 0; }
}
@media (max-width: 900px) {
  .square-sale-event-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .square-sale-selection-tools { grid-column: 1 / -1; }
}

/* Match the Orders toolbar panel actions. */
.square-sale-event-form .square-sale-selection-tools button,.square-sale-event-form .square-sale-event-submit { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-width:82px; width:auto; min-height:62px; height:auto; padding:9px 12px; margin:0; border:1px solid #bed9cd; border-radius:8px; background:#f7fbf8; color:#22664e; box-shadow:0 2px 0 #c4dbce; font-size:11px; font-weight:600; line-height:1.25; cursor:pointer; }
.square-sale-event-form button svg { width:20px; height:20px; flex:0 0 20px; fill:none; stroke:currentColor; stroke-width:1.7; }
.square-sale-event-form .square-sale-selection-tools button:hover:not(:disabled) { background:#eaf5ee; border-color:#398e6c; }
.square-sale-event-form button:active:not(:disabled) { transform:translateY(1px); box-shadow:0 1px 0 #c4dbce; }
.square-sale-event-form .square-sale-event-submit { background:#1f6f5b; border-color:#1f6f5b; color:#fff; box-shadow:0 2px 0 #174f40; }
.square-sale-event-form .square-sale-selection-tools button:disabled,.square-sale-event-form .square-sale-event-submit:disabled { color:#7b9085; background:#f2f6f3; border-color:#dbe6df; opacity:.65; box-shadow:none; cursor:not-allowed; }
.square-sale-event-form .square-sale-selection-count { padding:0; flex-basis:100%; margin:0 0 4px; background:transparent; }
.business-portal-mode:not(.organization-portal-mode) [data-business-view="orders"] .bp-order-receipt-row.has-square-selection { position:relative; padding-left:56px; }
.business-portal-mode:not(.organization-portal-mode) [data-business-view="orders"] .bp-order-receipt-row.is-square-selected { border-color:#9cc5b5; background:#f0f8f4; box-shadow:inset 3px 0 #1f6f5b; }
@media(max-width:540px) {
 .square-sale-event-form { padding:14px; }
 .square-sale-event-form .square-sale-event-head { align-items:flex-start; gap:10px; margin-bottom:14px; }
 .square-sale-event-form .square-sale-event-icon { display:grid; }
 .square-sale-event-form .square-sale-event-controls { gap:12px; grid-template-columns:minmax(0,1fr); }
 .square-sale-event-form.is-single-sale .square-sale-event-controls { grid-template-columns:minmax(0,1fr); }
 .square-sale-event-form .square-sale-event-submit { flex-direction:row; min-height:44px; width:100%; }
 .square-sale-event-form .square-sale-selection-tools button { flex:1; min-width:0; }
 .square-sale-event-form .square-sale-event-foot { font-size:11px; }
}
