.edit_box {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  padding: 20px 20px 40px; /* More bottom padding for buttons */
  background: #fff;
  border-radius: 8px;
  box-sizing: border-box;
}

.edit_box .checkbox-group {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* Changed from space-between to avoid huge gaps with only 2 items */
}
.ok_address{float:left;width:8%;display:inline-block;height:100px;}
.edit_box ol {
  flex: 0 0 calc(50% - 20px); /* Two columns with gap consideration */
  margin: 20px 10px;
  padding: 15px;
  border: 1px solid #ddd;
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s;
  box-sizing: border-box;
  min-height: 130px;
  list-style: none;
  background: #fff;
  display: flex;
  flex-direction: column;
  position:relative;
}

.edit_box .popup-buttons {
  flex: 0 0 100%;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-bottom: 10px;
}

.edit_box .clear {
  flex: 0 0 100%;
  height: 0;
}

.edit_box ol.active {
  background: #e8f9fa;
  border-color: #22a3a7;
  box-shadow: 0 0 8px rgba(34, 163, 167, 0.2);
}

.edit_box ol .address_title {
  margin-bottom: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: #333;
  width: 100%;
  position: absolute;
    top: -28px;
    left: 8px;
}

.edit_box ol .address_title .edit_info {
  height: 20px;
  width: 20px;
  background: url("../../images/svg/edit-1.svg") no-repeat center center;
  background-size: contain;
  cursor: pointer;
  opacity: 0.8;
  margin-right: 20px;
}

.edit_box ol .address_title .edit_info:hover {
  opacity: 1;
}

.edit_box ol .address_title .title_left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.title_left:before{content:"";width:20px; height:20px; background:url(../../images/svg/local-7.svg?v=22) no-repeat center center; background-size:20px;}
.edit_box ol.active .title_left:before{background:url(../../images/svg/local-6.svg?v=22) no-repeat center center;}
.edit_box ol .address_details {
  font-size: 13px;
  line-height: 1.6;
  color: #666;
  margin-top: 5px;
}
.edit_box ol .last{height:26px; width:auto; padding:0 12px;background:#f9ecb7; color:#888;text-align:center; line-height:26px; border-radius:20px; position:absolute; right:5px; top:40%;}
/* Radio button styles in popup */
.checkbox-group input[type="radio"] {
  display: none !important;
}

.checkbox-group input[type="radio"] + label {
  display: inline-block !important;
  width: 22px !important;
  height: 22px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  background: #fff !important;
  position: relative !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}

.checkbox-group input[type="radio"] + label:before,
.checkbox-group input[type="radio"] + label:after {
  display: none !important;
}

.checkbox-group input[type="radio"]:checked + label {
  background: #22a3a7 !important;
  border-color: #22a3a7 !important;
}

.checkbox-group input[type="radio"]:checked + label:after {
  content: "\2713" !important;
  display: block !important;
  color: #fff !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  font-size: 14px !important;
  font-weight: bold !important;
  background: none !important;
  width: auto !important;
  height: auto !important;
}

.edit_box .popup-btn-save,
.edit_box .popup-btn-cancel {
  display: inline-block;
  padding: 0 25px;
  height: 42px;
  text-align: center;
  border-radius: 5px;
  font: bold 14px/42px arial;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-sizing: border-box;
  margin: 0;
  width: auto !important; /* Force override global fixed widths */
  min-width: 120px; /* Ensure enough space for longer text */
}

.edit_box .popup-btn-save {
  background: #22a3a7 !important;
  color: #fff !important;
  border: 1px solid #22a3a7 !important;
}

.edit_box .popup-btn-cancel {
  background: #999 !important;
  color: #fff !important;
  border: 1px solid #999 !important;
}

.edit_box .popup-btn-save:hover,
.edit_box .popup-btn-cancel:hover {
  opacity: 0.8;
}

.edit_box .popup-btn-save.loading,
.edit_box .popup-btn-cancel.loading {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
  color: transparent !important;
}

.edit_box .popup-btn-save.loading:after,
.edit_box .popup-btn-cancel.loading:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.edit_box .address_name {
  border-bottom: 1px solid #22a3a7 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  font-size: 18px;font-weight:bold;
  background: none !important;
  border-radius: 0;
  color: #f97f07;
}

.edit {
  width: 90%;
  margin: 15px auto;
  padding: 12px 0;
}

.edit ul li {
  position: relative;
  margin-bottom: 15px;
  list-style: none;
}

.edit label {
  display: block;
  font-weight: bold;
  line-height: 24px;
  text-align: left;
  color: #666;
}

.edit label span {
  color: #f14b42;
}

.edit input,
.edit select {
  height: 40px;
  width: 100%;
  border: 1px solid #ccc;
  text-indent: 15px;
  border-radius: 4px;
  display: block;
  box-sizing: border-box;
  font-size: 14px;
}

.edit .input3 {
  width: 44%;
  margin: 2px 3%;
  float: left;
}

.edit .input4 {
  width: 94%;
  margin: 2px 3%;
  float: left;
}

.edit_box_dialog .ui-dialog-content {
  padding: 0;
}

/* Google Autocomplete Styles */
.edit_box .shipping-position {
  min-height: 28px !important;
  height: auto !important;
  display: none;
  z-index: 99999 !important;
  position: absolute !important; /* Changed from relative to absolute */
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
}

.edit_box .shipping-auto-complete {
  display: block !important;
  border: 1px solid #ccc !important;
  position: relative !important; /* Changed from absolute to relative since parent is absolute */
  padding: 5px 0 0 !important;
  z-index: 99999 !important;
  background-color: #fff !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.edit_box .shipping-auto-complete-content p {
  cursor: pointer !important;
  padding: 10px 15px !important;
  margin: 0 !important;
  border-bottom: 1px solid #eee !important;
  color: #333 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  text-align: left !important;
  background: #fff !important;
}

.edit_box .shipping-auto-complete-content p:last-child {
  border-bottom: none !important;
}

.edit_box .shipping-auto-complete-content p:hover {
  background: #f0f7f7 !important;
  color: #22a3a7 !important;
}

.edit_box .google-supply {
  text-align: right !important;
  border-top: 1px solid #eee !important;
  font-size: 11px !important;
  padding: 6px 10px !important;
  color: #999 !important;
  background: #fafafa !important;
}

.clear {
  clear: both;
}

.auto-complete-div {
  position: relative;
  display: block;
  width: 100%;
}
.format{font-size:14px;color:#999 !important;}
.phone-reg{display:flex;border:1px solid #ccc;border-radius:5px;background:#fff}
.country-reg{position:relative;width:120px;border-right:1px solid #ccc}
.phone-reg input{border:0 !important;}

/* 以下完全保留你的样式，只改类名 */
.btn-country{ display: flex;align-items: center;gap: 8px;padding: 4px;cursor: pointer;flex-wrap: wrap;align-content: space-around;justify-content: center;}
li.input3 .btn-country{margin-top:6px; }
.flag-reg{width:24px;height:16px}
.menu-country{position:absolute;top:100%;left:0;width:100%;background:#fff;border:1px solid #ccc;z-index:9999}
.item-flag{display:flex;align-items:center;gap:8px;padding: 10px 0 10px 5px;cursor:pointer}
.item-flag:hover{background:#f1f1f1}
/* Mobile Responsive */
@media (max-width: 768px) {
  .edit_box ol {
    flex: 0 0 94%;
  }
  .edit .input3 {
    width: 94%;
  }
  .edit_box {
    padding: 10px;
  }
}
