/* File: assets/css/wpdt-frontend.css */
.wpdt-box{margin-top:14px;display:flex;flex-direction:column;gap:10px;color:#000;font-weight:400;font-family:sans-serif;position:relative;}
.wpdt-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.wpdt-left{display:inline-flex !important;align-items:center;gap:8px;white-space:nowrap;word-break:keep-all;overflow-wrap:normal;flex:0 0 auto !important;max-width:100%;}
.wpdt-label{font-family:'Satoshi-Medium',sans-serif;font-weight:600;font-size:16px;color:#000;}
.wpdt-to{font-weight:400;font-size:16px;color:#000;}

.wpdt-time.wpdt-no-wrap{display:inline-flex !important;flex-direction:row !important;align-items:center !important;gap:6px !important;white-space:nowrap !important;flex-wrap:nowrap !important;font-weight:400;font-size:16px;color:#000;}
#wpdt-time-text{display:inline-block !important;white-space:nowrap !important;vertical-align:middle !important;}
.wpdt-time.wpdt-no-wrap .wpdt-info-icon{flex:0 0 auto !important;display:inline-flex !important;align-items:center;justify-content:center;vertical-align:middle;}
/* override inline display:none coming from element.style */
.wpdt-time.wpdt-no-wrap .wpdt-info-icon[style*="display:none"]{display:inline-flex !important;}

.wpdt-top > span,.wpdt-top .wpdt-label,.wpdt-top .wpdt-to,.wpdt-top .wpdt-zipcity{display:inline-block !important;white-space:nowrap;}
.wpdt-zipcity{pointer-events:auto;cursor:pointer;font-weight:400;font-size:16px;color:#000;text-decoration:underline;text-underline-offset:3px;outline:none;}

.wpdt-controls{display:none;}
.wpdt-row{display:flex;align-items:center;gap:0;}
.wpdt-input{height:44px;line-height:44px;border:1px solid #254232;border-right:0;border-radius:0;padding:0 14px;outline:none;min-width:260px;box-shadow:none !important;background:#fff;flex:1 1 auto;}
@media (min-width:768px){.wpdt-input{flex:0 1 25%;width:25%;}}
.wpdt-btn{appearance:none;-webkit-appearance:none;box-shadow:none !important;border:0 !important;outline:none !important;background:var(--wpdt-btn-bg,#1f3d2f) !important;color:var(--wpdt-btn-tx,#ffffff) !important;display:inline-flex;align-items:center;justify-content:center;height:44px;line-height:44px;padding:0 18px;border-radius:0;cursor:pointer;text-decoration:none;font:inherit;transition:opacity 0.2s ease, background-color 0.2s ease;}
.wpdt-btn:disabled{opacity:.6;cursor:not-allowed;pointer-events:none;background:var(--wpdt-btn-bg,#1f3d2f) !important;filter:grayscale(0.3);}
.wpdt-btn:hover:not(:disabled){opacity:0.9;}
.wpdt-time.wpdt-error #wpdt-time-text{animation:shake 0.3s ease-in-out;}
@keyframes shake{0%,100%{transform:translateX(0);}25%{transform:translateX(-2px);}75%{transform:translateX(2px);}}
.wpdt-error{color:#d92c2c !important;}
@media (max-width:540px){.wpdt-input{min-width:160px;}}

/* Modal */
.wpdt-modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;z-index:9998;}
.wpdt-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;max-width:560px;width:90%;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.2);display:none;z-index:9999;}
.wpdt-modal-header{position:relative;padding:14px 48px;border-bottom:1px solid #eee;font-weight:600;font-size:16px;display:flex;justify-content:center;align-items:center;}
#wpdt-modal-title{text-align:center;width:100%;}
.wpdt-modal-body{padding:16px;max-height:60vh;overflow:auto;}
.wpdt-truck{display:inline-flex;vertical-align:middle;}
.wpdt-truck svg{width:22px;height:22px;display:block;}
.wpdt-info-icon svg{width:16px;height:16px;display:block;}
.wpdt-no-wrap{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
body.wpdt-modal-open{overflow:hidden !important;}

/* Close button 24x24 and isolated from theme */
#wpdt-delivery-box .wpdt-modal .wpdt-modal-close{all:unset !important;position:absolute !important;right:10px !important;top:8px !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;width:24px !important;height:24px !important;padding:0 !important;margin:0 !important;background:none !important;border:none !important;outline:none !important;box-shadow:none !important;cursor:pointer !important;line-height:0 !important;font-size:0 !important;z-index:10000 !important;-webkit-tap-highlight-color:transparent !important;}
#wpdt-delivery-box .wpdt-modal .wpdt-modal-close::before,#wpdt-delivery-box .wpdt-modal .wpdt-modal-close::after{content:none !important;display:none !important;}
#wpdt-delivery-box .wpdt-modal .wpdt-modal-close svg{display:block !important;width:24px !important;height:24px !important;max-width:none !important;max-height:none !important;min-width:24px !important;min-height:24px !important;}
#wpdt-delivery-box .wpdt-modal .wpdt-modal-close svg path{stroke:#000 !important;}

/* Prevent Elementor global SVG overrides */
#wpdt-delivery-box svg{max-width:none !important;height:auto !important;}

/* 修正所有SVG图标尺寸，防止骨架或主题撑大 */
#wpdt-delivery-box svg,
#wpdt-delivery-box .wpdt-truck svg,
#wpdt-delivery-box .wpdt-info-icon svg,
#wpdt-delivery-box .wpdt-modal-close svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  box-sizing: content-box !important;
}
#wpdt-delivery-box .wpdt-modal-close svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
}
#wpdt-delivery-box .wpdt-modal-close {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  line-height: 0 !important;
  font-size: 0 !important;
  z-index: 10000 !important;
  -webkit-tap-highlight-color: transparent !important;
}
#wpdt-delivery-box .wpdt-modal-close::before,
#wpdt-delivery-box .wpdt-modal-close::after {
  content: none !important;
  display: none !important;
}

/* 骨架屏动画 */
@keyframes wpdt-skeleton {
  0% { background-color: #f3f3f3; }
  50% { background-color: #ececec; }
  100% { background-color: #f3f3f3; }
}
.wpdt-skeleton {
  color: transparent !important;
  background: #f3f3f3 !important;
  border-radius: 4px;
  min-height: 1em;
  animation: wpdt-skeleton 1.2s infinite ease-in-out;
}
.wpdt-box { min-height: 80px; }
.wpdt-label.wpdt-skeleton, #wpdt-where.wpdt-skeleton, #wpdt-time-text.wpdt-skeleton {
  min-width: 60px;
  min-height: 18px;
  display: inline-block;
}
#wpdt-time.wpdt-skeleton { min-width: 80px; min-height: 18px; display: inline-block; }