.speedy_hidden_checkout_fields  { display:none; }

.speedy_clear {clear:both; }

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

}
/* new speedy */
.speedy_shipping_to, .speedy_shipping_to_apt, .speedy_shipping_to_office, .speedy_shipping_to_address, .speedy_services, .speedy_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 */
#speedyLoader {
  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 #dc0032;
  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) {
#speedy_complex_id_field, #speedy_street_id_field {
  width: 60%;
}

#speedy_block_no_field, #speedy_street_no_field, #speedy_entrance_no_field, #speedy_floor_no_field, #speedy_apartment_no_field {
  width: 30%;
}

#speedy_entrance_no_field, #speedy_floor_no_field, #speedy_apartment_no_field {
  float: left;
}

#speedy_entrance_no_field, #speedy_floor_no_field {
  margin-right: 4.7% !important;
}

}

/* shipping to radio inline style */

.optional {
  display:none;
}

#speedy_shipping_to_field {
  overflow: hidden;
}


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

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

/* speedy edit recipient address */

.speedy-info-container {
  margin: 0;
  padding: 0;
  width: 100%;
}

.speedy-info-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.speedy-info-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.speedy-info-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.speedy-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  text-align: left;
}

.speedy-info-row strong {
  flex-shrink: 0;
  min-width: 120px;
}

.speedy-info-row span {
  flex: 1;
  word-break: break-word;
}

.edit_speedy_address, a.edit_speedy_address::after, #edit_speedy_address_user_checkout, a#edit_speedy_address_user_checkout::after  {
  font-family: Dashicons;
  content: '\f464';
  text-align: center;
  vertical-align: top;
  line-height: 14px;
  font-size: 14px;
  font-weight: 400;
}

a.edit_speedy_address, a#edit_speedy_address_user_checkout {
  width: 14px;
  height: 14px;
  padding: 0;
  margin: 0 0 0 6px;
  overflow: visible;
  color: #999;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}

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

/* Speedy order edit page address fields layout */

/* Hide address wrappers by default */
#speedy_edit_recipient_address .speedy-field-wrapper.speedy_shipping_to_address {
  display: none;
}

/* Locality field full width */
#speedy_edit_recipient_address #speedy_site_id_field {
  width: 100%;
  margin-bottom: 15px;
}

#speedy_edit_recipient_address #speedy_site_id_field .select2-container {
  width: 100% !important;
}

/* Custom field wrapper styles - using overflow for clearfix */
#speedy_edit_recipient_address .speedy-field-wrapper {
  margin-bottom: 15px;
  width: 100%;
  overflow: hidden;
}

/* Street row: 2/3 + 1/3 */
#speedy_edit_recipient_address .speedy-field-wrapper.speedy-field-street-pair .speedy-field-2-3 {
  float: left;
  width: 65%;
  margin-right: 2%;
}

#speedy_edit_recipient_address .speedy-field-wrapper.speedy-field-street-pair .speedy-field-1-3 {
  float: left;
  width: 33%;
}

/* Quarter row: 2/3 + 1/3 */
#speedy_edit_recipient_address .speedy-field-wrapper.speedy-field-quarter-pair .speedy-field-2-3 {
  float: left;
  width: 65%;
  margin-right: 2%;
}

#speedy_edit_recipient_address .speedy-field-wrapper.speedy-field-quarter-pair .speedy-field-1-3 {
  float: left;
  width: 33%;
}

/* Triple row: 1/3 + 1/3 + 1/3 */
#speedy_edit_recipient_address .speedy-field-wrapper.speedy-field-triple .speedy-field-third {
  float: left;
  width: 32%;
  margin-right: 2%;
}

#speedy_edit_recipient_address .speedy-field-wrapper.speedy-field-triple .speedy-field-third:last-child {
  margin-right: 0;
}

/* Full width fields */
#speedy_edit_recipient_address .speedy-field-wrapper.speedy-field-full .speedy-field-full {
  width: 100%;
}

#speedy_edit_recipient_address .speedy-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

#speedy_edit_recipient_address .speedy-field input[type="text"],
#speedy_edit_recipient_address .speedy-field select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: #fff;
  color: #333;
  min-height: 38px;
  margin: 0;
  box-sizing: border-box;
}

#speedy_edit_recipient_address .speedy-field input[type="text"]:focus,
#speedy_edit_recipient_address .speedy-field select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Override Select2 styles for custom fields */
#speedy_edit_recipient_address .speedy-field .select2-container {
  width: 100% !important;
}

/* Override WooCommerce admin Select2 width */
.post-type-shop_order #speedy_edit_recipient_address .speedy-field .select2-container,
.post-type-shop_order #speedy_edit_recipient_address .speedy-field-2-3 .select2-container {
  width: 100% !important;
}

#speedy_edit_recipient_address .speedy-field .select2-container .select2-selection--single {
  height: 38px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  padding: 5px 10px !important;
}

#speedy_edit_recipient_address .speedy-field .select2-container .select2-selection__rendered {
  line-height: 26px !important;
  color: #333 !important;
  padding-left: 0 !important;
}

#speedy_edit_recipient_address .speedy-field .select2-container .select2-selection__arrow {
  height: 36px !important;
}

#speedy_services_errors > p {
  color: #FF0000;
} 

/* wrap select2 checkout fields */
.select2-selection--single {
  height: 100% !important;
}
.select2-selection__rendered{
  word-wrap: break-word !important;
  text-overflow: inherit !important;
  white-space: normal !important;
}

.speedy_hide {
  display: none!important;
}

#speedy_user_checkout_field {
    cursor: pointer;
}

@media (max-width: 532px) {
  label[for=speedy_shipping_to_ADDRESS]:first-child {
      display: none !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%;
}

.speedy_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;
} 

.speedy_wc_orders_list:hover { 
  background-color: #dc0032;
  color: #fff;
  cursor: pointer; 
  margin: 5px; 
}

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

.speedy-colorbox-table th, .speedy-colorbox-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.speedy-colorbox-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

#order_parcel_form .client_id { 
  width:100%!important; 
}

#order_parcel_form td #client_id {
    width:100% !important;
    text-wrap: wrap;
}

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

/* Speedy office/apt fields - label above select */
.post-type-shop_order #speedy_pickup_apt_id_field label,
.post-type-shop_order #speedy_pickup_office_id_field label {
    display: block;
    width: 100%;
    margin-bottom: 5px;
}

.post-type-shop_order #speedy_pickup_apt_id_field .woocommerce-input-wrapper,
.post-type-shop_order #speedy_pickup_office_id_field .woocommerce-input-wrapper {
    display: block;
}

.post-type-shop_order #speedy_pickup_apt_id_field .select2-container,
.post-type-shop_order #speedy_pickup_office_id_field .select2-container {
    width: 100% !important;
}
