.tfb-payment-form{
  /* Never allow an Elementor/theme parent wider than the viewport to stretch the form. */
  width:min(100%, calc(100vw - 24px));
  max-width:820px;
  min-width:0;
  margin-inline:auto;
  position:relative;
  box-sizing:border-box;
  container-type:inline-size;
  container-name:tfbform;
  overflow-wrap:anywhere;
  overflow-x:clip;
}
.tfb-payment-form *,
.tfb-payment-form *::before,
.tfb-payment-form *::after{box-sizing:border-box;min-width:0}
/* Theme/Elementor CSS must not give form controls an intrinsic/fixed mobile width. */
.tfb-payment-form input:not([type=radio]):not([type=checkbox]):not([type=hidden]),
.tfb-payment-form select,
.tfb-payment-form textarea{
  width:100%;
  max-width:100%;
  min-width:0!important;
}
.tfb-payment-form img,
.tfb-payment-form svg{max-width:100%;height:auto}
.tfb-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.tfb-step-header{margin-bottom:22px;min-width:0}
.tfb-step-header h3{margin:0 0 7px;font-size:1.45em;overflow-wrap:anywhere}
.tfb-step-header p{margin:0;color:#555;overflow-wrap:anywhere}
.tfb-fields-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px 16px;width:100%;min-width:0}
.tfb-field{grid-column:span 6;min-width:0;max-width:100%}
.tfb-width-50{grid-column:span 3}
.tfb-width-33{grid-column:span 2}
.tfb-field>label{display:block;margin-bottom:7px;font-weight:600;min-width:0;overflow-wrap:anywhere}
.tfb-field input[type=text],.tfb-field input[type=email],.tfb-field input[type=tel],.tfb-field input[type=number],.tfb-field select,.tfb-field textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0;padding:11px 12px;border:1px solid #cfcfcf;border-radius:5px;font:inherit;background:#fff}
.tfb-field textarea{min-height:110px;resize:vertical}
.tfb-choice-group{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:100%}
.tfb-choice{display:flex!important;align-items:center;gap:8px;font-weight:400!important;padding:9px 10px;border:1px solid #ddd;border-radius:5px;min-width:0;max-width:100%;flex-wrap:wrap}
.tfb-choice input{width:auto;flex:0 0 auto}
.tfb-choice>span{min-width:0;flex:1 1 160px;overflow-wrap:anywhere}
.tfb-price-delta{margin-right:auto;white-space:nowrap;flex:0 0 auto}
.tfb-checkbox-label{display:flex!important;gap:8px;align-items:flex-start;min-width:0}
.tfb-checkbox-label input{margin-top:4px;flex:0 0 auto}
.tfb-help{font-size:.9em;color:#646970;margin-top:6px;overflow-wrap:anywhere}
.tfb-required{color:#b32d2e}
.tfb-info{padding:13px 15px;background:#f6f7f7;border-right:4px solid #2271b1;border-radius:4px;min-width:0;max-width:100%}
.tfb-info strong{display:block;margin-bottom:4px}
.tfb-info p{margin:4px 0}
.tfb-step-nav{display:flex;gap:10px;justify-content:flex-end;margin-top:25px;flex-wrap:wrap;min-width:0}
.tfb-step-nav button,.tfb-add-repeater{cursor:pointer;padding:11px 20px;border:0;border-radius:5px;font:inherit;max-width:100%}
.tfb-next,.tfb-submit{background:#2271b1;color:#fff}
.tfb-prev,.tfb-add-repeater{background:#f0f0f1;color:#1d2327}
.tfb-progress{margin-bottom:24px;min-width:0;max-width:100%}
.tfb-progress-bar{height:7px;background:#e5e5e5;border-radius:20px;overflow:hidden}
.tfb-progress-bar span{display:block;height:100%;background:#2271b1;transition:width .2s}
.tfb-progress-text{font-size:.88em;margin-top:6px;overflow-wrap:anywhere}
.tfb-total-box{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px;padding:15px;border-top:1px solid #ddd;font-size:1.1em;min-width:0}
.tfb-total{font-size:1.3em;white-space:nowrap}
.tfb-ranking{list-style:none;margin:0;padding:0;min-width:0;max-width:100%}
.tfb-ranking li{margin:7px 0;padding:11px 12px;border:1px solid #dcdcde;border-radius:5px;background:#fff;cursor:move;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal}
.tfb-drag-handle{margin-left:8px;color:#777;display:inline-block}
.tfb-repeater{min-width:0;max-width:100%}
.tfb-repeater-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:9px;align-items:end;margin-bottom:9px;padding:10px;background:#f7f7f7;border-radius:5px;min-width:0;max-width:100%}
.tfb-repeater-row label{min-width:0;max-width:100%}
.tfb-repeater-row label span{display:block;font-size:.9em;margin-bottom:4px;overflow-wrap:anywhere}
.tfb-repeater-row input{width:100%;max-width:100%;min-width:0}
.tfb-remove-repeater{border:0;background:transparent;font-size:22px;cursor:pointer;padding:8px;min-width:40px;min-height:40px}
.tfb-add-repeater{margin-top:5px}
.tfb-condition-hidden{display:none!important}

/* Hard viewport guard for narrow devices, including pages whose outer wrapper has horizontal overflow. */
@media (max-width:767px){
  .tfb-payment-form{
    width:calc(100vw - 24px)!important;
    max-width:calc(100vw - 24px)!important;
    margin-inline:auto!important;
  }
  .tfb-fields-grid,
  .tfb-field,
  .tfb-choice-group,
  .tfb-choice,
  .tfb-ranking,
  .tfb-ranking li,
  .tfb-repeater,
  .tfb-repeater-row,
  .tfb-step-nav,
  .tfb-total-box{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  .tfb-ranking li,
  .tfb-choice,
  .tfb-help,
  .tfb-info,
  .tfb-step-header,
  .tfb-step-header h3,
  .tfb-step-header p{
    white-space:normal!important;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
}

/* Fallback based on viewport width (Elementor's common mobile breakpoint). */
@media (max-width:767px){
  .tfb-width-50,.tfb-width-33{grid-column:span 6}
  .tfb-repeater-row{grid-template-columns:1fr}
  .tfb-step-nav{justify-content:space-between}
}

@media (max-width:480px){
  .tfb-fields-grid{gap:16px 0}
  .tfb-step-header h3{font-size:1.25em}
  .tfb-step-nav{display:grid;grid-template-columns:1fr;gap:8px}
  .tfb-step-nav button,.tfb-add-repeater{width:100%}
  .tfb-total-box{padding:12px 0}
  .tfb-choice{align-items:flex-start}
  .tfb-price-delta{width:100%;margin-right:0;padding-right:28px}
}

/* Prefer the actual form/container width when supported. */
@container tfbform (max-width:700px){
  .tfb-width-50,.tfb-width-33{grid-column:span 6}
  .tfb-repeater-row{grid-template-columns:1fr}
}

@container tfbform (max-width:480px){
  .tfb-fields-grid{gap:16px 0}
  .tfb-step-nav{display:grid;grid-template-columns:1fr;gap:8px}
  .tfb-step-nav button,.tfb-add-repeater{width:100%}
  .tfb-choice{align-items:flex-start}
  .tfb-price-delta{width:100%;margin-right:0;padding-right:28px}
}

/* v2.4 commerce / inventory */
.tfb-stock-notice,
.tfb-sold-out{
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    margin:0 0 16px;
    padding:12px 14px;
    border:1px solid #dcdcde;
    border-radius:8px;
    background:#fff;
    overflow-wrap:anywhere;
}
.tfb-sold-out{
    text-align:center;
    font-weight:600;
}


/* v2.7.1 sold-out action */
.tfb-sold-out-with-action{display:flex;flex-direction:column;align-items:center;gap:12px}
.tfb-sold-out-message{width:100%}
.tfb-sold-out-action{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border-radius:7px;background:#2271b1;color:#fff!important;text-decoration:none!important;font-weight:600;line-height:1.2}
.tfb-sold-out-action:hover,.tfb-sold-out-action:focus{background:#135e96;color:#fff!important;text-decoration:none!important}
@media(max-width:480px){.tfb-sold-out-action{width:100%;box-sizing:border-box}}

/* v2.8.0 inline submission errors */
.tfb-form-error{
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    margin:0 0 16px;
    padding:12px 14px;
    border:1px solid #d63638;
    border-right:4px solid #d63638;
    border-radius:8px;
    background:#fff1f1;
    color:#8a1f20;
    font-weight:600;
    line-height:1.5;
    overflow-wrap:anywhere;
}
.tfb-form-wrap{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
@media (max-width:767px){
  .tfb-form-wrap{
    width:calc(100vw - 24px)!important;
    max-width:calc(100vw - 24px)!important;
    margin-inline:auto!important;
  }
}
