.boxnow_hidden_checkout_fields  { display:none; }

.boxnow_clear {clear:both; }

#woocommerce_boxnow_shipping_method_live_description {
	  margin: 2px 0 5px;
  	  color: #666;
  	  font-style: italic;
  	  font-size: 14px;
  	  margin-bottom: 8px;

}
/* new boxnow */
.boxnow_shipping_to, .boxnow_shipping_to_apt, .boxnow_shipping_to_office, .boxnow_shipping_to_address, .boxnow_services, .boxnow_shipping_to_address_type2 { display:none; } /* v admin nastroikite skrivam poleto s ime na ofis, koeto se zadava s js ot poleto Sender Office/Store*/

.ui-autocomplete-loading {
  background: url('/wp-includes/images/spinner.gif') no-repeat;
  background-position: right 10px center;
}


/* Center the loader */
#boxnowLoader {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 100px;
  height: 100px;
  margin: -75px 0 0 -75px;
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #44d62c;
  width: 100px;
  height: 100px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* checkout filed style */
@media (min-width: 768px) {
#boxnow_complex_id_field, #boxnow_street_id_field {
  width: 60%;
}

#boxnow_block_no_field, #boxnow_street_no_field, #boxnow_entrance_no_field, #boxnow_floor_no_field, #boxnow_apartment_no_field {
  width: 30%;
}

#boxnow_entrance_no_field, #boxnow_floor_no_field, #boxnow_apartment_no_field {
  float: left;
}

#boxnow_entrance_no_field, #boxnow_floor_no_field {
  margin-right: 4.7% !important;
}

}

/* shipping to radio inline style */

.optional {
  display:none;
}

#boxnow_shipping_to_field {
  overflow: hidden;
}


.boxnow_shipping_to label {
  float: left;
  clear: none;
  padding: 2px 1em 0 0;
}

.boxnow_shipping_to_input {
  float: left;
  clear: none;
  margin:  10px 5px 0 0;
}

/* boxnow edit recipient address */

.boxnow-table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin:0;
  padding:0;
  width: 100%;
}
.boxnow-table tr {
  border: 1px solid #ddd;
  padding: 5px;
}
.boxnow-table th, .boxnow-table td {
  padding: 10px;
  text-align: center;
}
.boxnow-table th {
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
@media screen and (max-width: 600px) {
  .boxnow-table {
    border: 0;
  }
  .boxnow-table thead {
    display: none;
  }
  .boxnow-table tr {
    border-bottom: 2px solid #ddd;
    display: block;
    margin-bottom: 10px;
  }
  .boxnow-table td {
    border-bottom: 1px dotted #ccc;
    display: block;
    font-size: 13px;
    text-align: left;
  }
  .boxnow-table td:last-child {
    border-bottom: 0;
  }
  .boxnow-table td:before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }
}

.edit_boxnow_address, a.edit_boxnow_address::after  {
  font-family: Dashicons;
  content: '\f464';
  position: absolute;
  top: 0;
  left: 0;
  text-align: center;
  vertical-align: top;
  line-height: 14px;
  font-size: 14px;
  font-weight: 400;
}

a.edit_boxnow_address {
  width: 14px;
  height: 0;
  padding: 14px 0 0;
  margin: 0 0 0 6px;
  overflow: hidden;
  position: relative;
  color: #999;
  border: 0;
  float: right;
}

a.edit_boxnow_address:hover {
    color: #000000;
} 

.boxnow_hide {
  display: none !important;
}

/* Registered-user saved-locker summary at checkout (read-only + edit pencil, like Econt) */
#boxnow_user_checkout_field {
  margin-bottom: 12px;
  cursor: pointer;
}
.boxnow_checkout_address {
  position: relative;
  padding-right: 24px;
  line-height: 1.6;
}
a#edit_boxnow_address_user_checkout {
  font-family: Dashicons;
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  color: #999;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
a#edit_boxnow_address_user_checkout::before {
  content: '\f464';
  font-size: 18px;
}
a#edit_boxnow_address_user_checkout:hover {
  color: #000;
}

/* ==========================================================================
   My Account → Addresses: saved BOX NOW locker card (styled like Econt/Speedy,
   in BOX NOW green). Card + header + rows + edit pencil + edit form.
   ========================================================================== */
#boxnow_services_errors > p { color: #FF0000; margin: 0 0 10px; }

.boxnow_user_address.boxnow-ma-card,
#boxnow_edit_user_address.boxnow-ma-card {
  position: relative;
  background: #fff;
  border: 1px solid #dbe7d5;
  border-radius: 12px;
  padding: 18px 20px 16px;
  margin: 10px 0 26px;
  box-shadow: 0 1px 3px rgba(53, 179, 34, .07);
  max-width: 640px;
  line-height: 1.55;
}
.boxnow_user_address.boxnow-ma-card:hover { border-color: #bfe0b3; }

/* The edit form opens below the (still-visible) saved-address summary, so hide its
   repeated logo header. */
#boxnow_edit_user_address.boxnow-ma-form .boxnow-ma-head { display: none; }
#boxnow_edit_user_address.boxnow-ma-form { margin-top: -14px; }

.boxnow-ma-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0 34px 12px 0;
  border-bottom: 1px solid #eef4ec;
}
.boxnow-ma-logo { height: 28px; width: auto; display: inline-block; }
.boxnow-ma-title { font-weight: 700; font-size: 16px; color: #2e8f1a; }

/* Edit pencil: pill button with an SVG-mask pencil (overrides the base
   .edit_boxnow_address Dashicons ::after so only one crisp glyph shows). */
.boxnow-ma-card .boxnow-ma-edit {
  position: absolute !important;
  top: 16px;
  right: 18px;
  left: auto !important;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #eaf7e6;
  text-decoration: none;
  border: 0;
  transition: background .15s ease;
}
.boxnow-ma-card .boxnow-ma-edit:before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  background-color: #35b322;
  font-family: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M3%2017.25V21h3.75L17.81%209.94l-3.75-3.75L3%2017.25zM20.71%207.04a1%201%200%200%200%200-1.41l-2.34-2.34a1%201%200%200%200-1.41%200l-1.83%201.83%203.75%203.75%201.83-1.83z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M3%2017.25V21h3.75L17.81%209.94l-3.75-3.75L3%2017.25zM20.71%207.04a1%201%200%200%200%200-1.41l-2.34-2.34a1%201%200%200%200-1.41%200l-1.83%201.83%203.75%203.75%201.83-1.83z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.boxnow-ma-card .boxnow-ma-edit:after { content: none !important; display: none !important; }
.boxnow-ma-card .boxnow-ma-edit:hover { background: #35b322; }
.boxnow-ma-card .boxnow-ma-edit:hover:before { background-color: #fff; }

.boxnow-ma-body { color: #333; font-size: inherit; }
.boxnow-ma-row { margin: 4px 0; }
.boxnow-ma-row strong {
  color: #2e8f1a;
  font-weight: 600;
  margin-right: 6px;
}

/* ---- edit form inside the card ---- */
#boxnow_edit_user_address.boxnow-ma-form .form-row { margin: 0 0 14px; }
#boxnow_edit_user_address.boxnow-ma-form label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #33513c;
  margin: 0 0 5px;
}
#boxnow_edit_user_address.boxnow-ma-form .select2-container { width: 100% !important; }
#boxnow_edit_user_address.boxnow-ma-form .select2-container--default .select2-selection--single {
  height: 42px;
  border: 1px solid #cddcc6;
  border-radius: 8px;
}
#boxnow_edit_user_address.boxnow-ma-form .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
  padding-left: 12px;
}
#boxnow_edit_user_address.boxnow-ma-form .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
}
#boxnow_edit_user_address.boxnow-ma-form select {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid #cddcc6;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}
#boxnow_edit_user_address.boxnow-ma-form a#boxnow_save_user_address {
  display: inline-block;
  background: #44d62d !important;
  border: 1px solid #44d62d !important;
  color: #0e2b08 !important;
  border-radius: 8px;
  padding: 11px 26px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(53, 179, 34, .28);
}
#boxnow_edit_user_address.boxnow-ma-form a#boxnow_save_user_address:hover {
  background: #35b322 !important;
  border-color: #35b322 !important;
  color: #08210b !important;
}

.select2-results__option.loading-results,
.select2-results__option.select2-results__option--load-more {
    background-image: url('/wp-admin/images/spinner.gif');
    background-repeat: no-repeat;
    padding-left: 35px;
    background-position: 10px 50%;
}

.boxnow_wc_orders_list { 
  appearance: none; 
  background-color: inherit; 
  border: none; 
  border-radius: 6px; 
  box-shadow: none; 
  box-sizing: initial; 
  color: #2271b1; 
  cursor: pointer; 
  display: inline-block; 
  font-weight: inherit; 
  padding: 5px; 
  position: relative; 
  text-align: center; 
  text-decoration: none; 
  user-select: none; 
  -webkit-user-select: none; 
  touch-action: manipulation; 
  vertical-align: middle; 
  white-space: nowrap; 
  margin: 5px;
} 

.boxnow_wc_orders_list:hover { 
  background-color: #44d62c;
  color: #fff;
  cursor: pointer; 
  margin: 5px; 
}

#boxnow_courier_id_field div {
    display: flex;
    align-items: center;
    margin-bottom: 8px; /* space between lines */
}

#boxnow_courier_id_field input[type="radio"] {
    margin-right: 8px;
}

.boxnow_courier_id label {
  cursor: pointer;
}

.boxnow-logo {
    height: 38px !important;
}

/* Hide the container and loader by default */
#boxnow_custom_checkout_field, 
#boxnowLoader {
    display: none;
}

/* 1. Force the wrapper to never exceed parent width */
.boxnow-method-fields-container {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box;
}

/* 2. Force the Select2 Container to be 100% of the wrapper */
.boxnow-method-fields-container .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* 3. THE KEY: Force the text to wrap instead of staying on one line */
.boxnow-method-fields-container .select2-selection--single {
    height: auto !important; /* Allow the box to grow vertically */
    min-height: 38px;
}

.boxnow-method-fields-container .select2-selection__rendered {
    white-space: normal !important; /* Allow text to wrap to next line */
    word-wrap: break-word !important;
    padding-right: 25px !important; /* Make room for the arrow */
    line-height: 1.4 !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* 4. Fix the arrow position for multi-line boxes */
.boxnow-method-fields-container .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
}


/* BOX NOW tracking link/button */
a.boxnow-track-link,
.boxnow-track-link {
    display: inline-block;
    margin: 3px 4px 3px 0;
    padding: 6px 14px;
    background-color: #44d62d;
    border: 1px solid #44d62d;
    border-radius: 4px;
    color: #10240b !important;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}
a.boxnow-track-link:hover,
.boxnow-track-link:hover {
    background-color: #35b322;
    border-color: #35b322;
    color: #0a1a07 !important;
}

/* Orders-list variant: same look as the "All Labels" link (.boxnow_wc_orders_list),
   but in BOX NOW green text. Inherits the green-background hover from that class. */
a.boxnow-track-link-list,
.boxnow-track-link-list {
    color: #44d62d;
    text-decoration: none;
}
a.boxnow-track-link-list:hover,
.boxnow_wc_orders_list.boxnow-track-link-list:hover {
    color: #fff;
}

/* Orders-list BOX NOW column: BOX NOW official green (#44d62d) font color */
.boxnow-action-container,
.boxnow-action-container .boxnow_wc_orders_list,
.boxnow-action-container button.boxnow_wc_orders_list {
    color: #44d62d;
}
/* Keep readable white text on the green hover background */
.boxnow-action-container .boxnow_wc_orders_list:hover,
.boxnow-action-container button.boxnow_wc_orders_list:hover {
    color: #fff;
}

/* AMP locator map: stay hidden (no empty pre-rendered frame) until lockers load and
   the JS reveals it with $('#boxnow_amps_map').show() — matches Speedy/Econt/Pigeon. */
#boxnow_amps_map { display: none; }

/* Mobile-friendly locker map (option B): allow vertical page scroll over the map on
   touch (paired with drag-pan disabled in JS) so a swipe scrolls the checkout. */
@media (pointer: coarse) {
    #boxnow_amps_map .ol-viewport,
    #boxnow_amps_map canvas {
        touch-action: pan-y !important;
    }
}

/* "Find nearest lockers" (geolocation) button + status message. */
.boxnow-nearest-row { margin-bottom: 12px; }
button.boxnow-find-nearest,
.boxnow-find-nearest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 9px 16px;
    background: #44d62d;
    border: 1px solid #44d62d;
    border-radius: 6px;
    color: #0e2b08;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
button.boxnow-find-nearest:hover,
.boxnow-find-nearest:hover {
    background: #35b322;
    border-color: #35b322;
    color: #08210b;
    box-shadow: 0 2px 6px rgba(53,179,34,.35);
}
button.boxnow-find-nearest:disabled,
.boxnow-find-nearest[disabled] { opacity: .6; cursor: default; box-shadow: none; }
.boxnow-find-nearest::before { content: "\1F4CD"; font-size: 1.05em; line-height: 1; } /* 📍 */
.boxnow-nearest-msg { display: block; margin-top: 6px; font-size: 12px; color: #b00; }
@media (max-width: 480px) {
    button.boxnow-find-nearest,
    .boxnow-find-nearest { width: 100%; justify-content: center; }
}

/* Order edit screen: the BOX NOW "edit address" city select2 dropdown was being
   clipped/hidden behind the following element because the WooCommerce order-data
   metabox wrappers use position/overflow that trap the absolutely-positioned
   dropdown. Neutralise position/overflow on those wrappers so the dropdown can
   overflow. Scoped to the order-edit screens only (classic post-type-shop_order
   and HPOS woocommerce_page_wc-orders) so it never touches product edit
   (.panel-wrap is shared) or any other admin screen. */
.post-type-shop_order #poststuff,
.post-type-shop_order #post-body,
.post-type-shop_order #post-body-content,
.post-type-shop_order #woocommerce-order-data,
.post-type-shop_order #woocommerce-order-data .inside,
.post-type-shop_order #order_data,
.post-type-shop_order .panel-wrap,
.post-type-shop_order .order_data_column_container,
.post-type-shop_order .order_data_column,
.post-type-shop_order .order_data_column_general,
.post-type-shop_order .order_data_column_billing,
.post-type-shop_order .boxnow-info-container,
.post-type-shop_order .boxnow-info-content,
.woocommerce_page_wc-orders #poststuff,
.woocommerce_page_wc-orders #post-body,
.woocommerce_page_wc-orders #post-body-content,
.woocommerce_page_wc-orders #woocommerce-order-data,
.woocommerce_page_wc-orders #woocommerce-order-data .inside,
.woocommerce_page_wc-orders #order_data,
.woocommerce_page_wc-orders .panel-wrap,
.woocommerce_page_wc-orders .order_data_column_container,
.woocommerce_page_wc-orders .order_data_column,
.woocommerce_page_wc-orders .order_data_column_general,
.woocommerce_page_wc-orders .order_data_column_billing,
.woocommerce_page_wc-orders .boxnow-info-container,
.woocommerce_page_wc-orders .boxnow-info-content {
    position: static !important;
    overflow: visible !important;
}
