/* MS Customer Quote UI: fully namespaced controls to avoid theme/WooCommerce button collisions */
#mscq-overlay .mscq-btn, .mscq-launch-wrap .mscq-btn{
  -webkit-appearance:none!important;appearance:none!important;box-sizing:border-box!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  margin:0!important;padding:11px 16px!important;min-height:42px!important;width:auto;
  border:1px solid transparent!important;border-radius:8px!important;box-shadow:none!important;
  background-image:none!important;text-decoration:none!important;text-transform:none!important;
  font-family:inherit!important;font-size:14px!important;font-weight:700!important;line-height:1.2!important;
  letter-spacing:0!important;cursor:pointer!important;transition:background .15s ease,border-color .15s ease,opacity .15s ease!important;
}
#mscq-overlay .mscq-btn::before,#mscq-overlay .mscq-btn::after,.mscq-launch-wrap .mscq-btn::before,.mscq-launch-wrap .mscq-btn::after{content:none!important;display:none!important}
#mscq-overlay .mscq-btn-primary,.mscq-launch-wrap .mscq-btn-primary{background:#111!important;color:#fff!important;border-color:#111!important}
#mscq-overlay .mscq-btn-primary:hover,.mscq-launch-wrap .mscq-btn-primary:hover{background:#2b2b2b!important;color:#fff!important;border-color:#2b2b2b!important}
#mscq-overlay .mscq-btn-secondary{background:#fff!important;color:#111!important;border-color:#cfcfcf!important}
#mscq-overlay .mscq-btn-secondary:hover{background:#f4f4f4!important;color:#111!important;border-color:#bdbdbd!important}
#mscq-overlay .mscq-btn-icon{padding:0!important;width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;border-radius:50%!important;background:#f3f3f3!important;color:#222!important;border-color:transparent!important;font-size:24px!important;font-weight:400!important;line-height:1!important}
#mscq-overlay .mscq-btn-icon:hover{background:#e8e8e8!important;color:#111!important}
#mscq-overlay .mscq-btn:disabled,.mscq-launch-wrap .mscq-btn:disabled{opacity:.55!important;cursor:not-allowed!important;pointer-events:none!important}
#mscq-overlay input.mscq-control,#mscq-overlay textarea.mscq-control,#mscq-overlay select.mscq-control{box-sizing:border-box!important}
.mscq-launch-wrap{margin-top:14px}.mscq-launch{width:100%}
body.mscq-modal-open{overflow:hidden}
.mscq-overlay{position:fixed;inset:0;background:rgba(0,0,0,.62);display:none;align-items:center;justify-content:center;z-index:999999;padding:12px}.mscq-overlay.is-open{display:flex}
.mscq-modal{background:#fff;width:min(980px,100%);height:min(860px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);border-radius:16px;position:relative;box-shadow:0 24px 70px rgba(0,0,0,.28);display:flex;flex-direction:column;overflow:hidden}
.mscq-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:22px 26px 18px;border-bottom:1px solid #e9e9e9;background:#fff;flex:0 0 auto}.mscq-modal h2{margin:2px 0 5px;font-size:25px;line-height:1.15}.mscq-kicker{font-size:11px;letter-spacing:1.2px;font-weight:700;color:#777}.mscq-intro{margin:0;color:#666;font-size:13px}.mscq-close{flex:0 0 auto!important}
.mscq-modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:18px 26px 24px;background:#f7f7f8}
.mscq-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mscq-grid section,.mscq-extras-section,.mscq-notes-label{min-width:0;background:#fff;border:1px solid #e4e4e4;border-radius:12px;padding:17px}.mscq-grid h3,.mscq-extras-section h3{margin:0 0 12px;font-size:16px}.mscq-grid label,.mscq-notes-label{display:block;margin:0 0 10px;font-weight:600;font-size:13px}.mscq-grid section label:last-child{margin-bottom:0}.mscq-grid input[type=text],.mscq-grid input[type=email],.mscq-grid input[type=number],.mscq-grid input[type=file],.mscq-notes-label textarea{width:100%;margin-top:5px;font-weight:400;min-height:40px;border-radius:7px}.mscq-grid input[type=file]{padding:7px;background:#fafafa}.mscq-check{display:flex!important;align-items:center;gap:8px;font-weight:500!important;padding:7px 0;margin:0!important}.mscq-check input{margin:0}.mscq-pricing-heading{margin-top:20px!important;padding-top:16px;border-top:1px solid #eee}
.mscq-extras-section{margin-top:16px}.mscq-extras-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:12px}.mscq-extras-head h3{margin:0 0 4px}.mscq-extras-head p{margin:0;color:#666;font-size:12px;max-width:670px;line-height:1.45}.mscq-extra-row{position:relative;border:1px solid #ddd;border-radius:10px;padding:13px 44px 12px 13px;margin-bottom:10px;background:#fafafa}.mscq-extra-fields{display:grid;grid-template-columns:1fr 1.4fr 150px;gap:10px}.mscq-extra-fields label{display:block;font-weight:600;font-size:12px;margin:0}.mscq-extra-fields input{width:100%;margin-top:5px;font-weight:400;min-height:38px}.mscq-extra-remove{position:absolute;right:9px;top:9px;border:0;background:transparent;font-size:24px;line-height:1;cursor:pointer;color:#777}
.mscq-notes-label{margin-top:16px!important}.mscq-notes-label textarea{resize:vertical;min-height:84px}
.mscq-modal-footer{flex:0 0 auto;border-top:1px solid #ddd;background:#fff;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:18px;box-shadow:0 -8px 24px rgba(0,0,0,.05)}.mscq-footer-totals{display:flex;align-items:center;gap:20px}.mscq-footer-totals>div{display:flex;flex-direction:column;gap:1px}.mscq-footer-totals span{font-size:11px;color:#777}.mscq-footer-totals strong{font-size:14px}.mscq-footer-grand{padding-left:18px;border-left:1px solid #ddd}.mscq-footer-grand strong{font-size:19px}.mscq-footer-actions{margin-left:auto;text-align:right}.mscq-actions{display:flex;justify-content:flex-end;gap:9px}.mscq-actions .mscq-btn{min-width:118px}.mscq-actions .mscq-btn-primary{min-width:155px}.mscq-status{font-size:12px;margin:0 0 5px;min-height:16px}.mscq-status.error{color:#b32d2e}.mscq-status.success{color:#008a20}
@media(max-width:760px){.mscq-overlay{padding:0}.mscq-modal{width:100%;height:100dvh;max-height:100dvh;border-radius:0}.mscq-modal-header{padding:16px 16px 13px}.mscq-modal h2{font-size:21px}.mscq-intro{font-size:12px}.mscq-modal-body{padding:13px}.mscq-grid{grid-template-columns:1fr;gap:12px}.mscq-grid section,.mscq-extras-section,.mscq-notes-label{padding:14px}.mscq-extras-head{display:block}.mscq-extras-head .mscq-btn{margin-top:10px;width:100%}.mscq-extra-fields{grid-template-columns:1fr}.mscq-modal-footer{align-items:stretch;flex-direction:column;padding:10px 13px;gap:9px}.mscq-footer-totals{justify-content:space-between;gap:10px}.mscq-footer-grand{padding-left:10px}.mscq-footer-actions{text-align:left;margin-left:0}.mscq-status{margin-bottom:4px}.mscq-actions{display:grid;grid-template-columns:1fr 1.35fr}.mscq-actions .mscq-btn{width:100%;min-width:0}}
@media(max-width:430px){.mscq-footer-totals{gap:7px}.mscq-footer-totals strong{font-size:12px}.mscq-footer-grand strong{font-size:16px}.mscq-footer-totals span{font-size:10px}}
#mscq-render-pages{
    position:fixed;
    left:-100000px;
    top:0;
    width:794px;
    background:#fff;
    font-family:Arial,"Helvetica Neue",sans-serif;
    color:#111
}
#mscq-render-pages *{box-sizing:border-box}
.mscq-pdf-page{
    position:relative;
    width:794px;
    height:1123px;
    overflow:hidden;
    background:#fff;
    padding:42px 50px 52px;
    font-family:Arial,"Helvetica Neue",sans-serif;
    font-size:12.5px;
    line-height:1.42;
    color:#111
}
.q-page-header{
    height:248px;
    overflow:hidden;
    border-bottom:1px solid #e2e2e2;
    padding-bottom:18px
}
.q-title-row{
    height:108px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:28px;
    margin:0 0 18px
}
.q-title-logo{flex:1;min-width:0;display:flex;align-items:center;height:108px}
.q-logo{
    display:block;
    max-width:270px;
    max-height:105px;
    width:auto;
    height:auto;
    object-fit:contain;
    object-position:left center
}
.q-title{text-align:right;white-space:nowrap;flex:0 0 auto}
.q-title h1{font-size:16px;letter-spacing:1px;margin:0 0 5px;line-height:1}
.q-parties{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:46px;
    align-items:start
}
.q-company,.q-customer{min-width:0;overflow-wrap:anywhere;word-break:normal}
.q-company-name{font-size:16px;font-weight:700;margin-bottom:5px;overflow-wrap:anywhere}
.q-client-name{font-size:16px;font-weight:700;margin-bottom:4px;overflow-wrap:anywhere}
.q-label{font-weight:700;font-size:10px;letter-spacing:.8px;margin-bottom:5px}
.q-page-content{
    position:absolute;
    left:50px;
    right:50px;
    top:308px;
    bottom:118px;
    overflow:hidden
}
.q-product-list{width:100%}
.q-table-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 76px 116px 116px;
    column-gap:0;
    width:100%;
    align-items:center
}
.q-table-grid.no-unit{grid-template-columns:minmax(0,1fr) 76px 116px}
.q-table-grid.no-line{grid-template-columns:minmax(0,1fr) 76px 116px}
.q-table-grid.no-unit.no-line{grid-template-columns:minmax(0,1fr) 76px}
.q-table-head{
    min-height:38px;
    padding:10px 10px 8px;
    border-bottom:2px solid #111;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase
}
.q-product-row{
    min-height:42px;
    padding:11px 10px;
    border-bottom:1px solid #ddd;
    break-inside:avoid;
    page-break-inside:avoid
}
.q-product-row>div{min-width:0}
.q-table-head>div,.q-product-row>div{padding-left:6px;padding-right:6px}
.q-table-head>div:first-child,.q-product-row>div:first-child{padding-left:0}
.q-table-head>div:last-child,.q-product-row>div:last-child{padding-right:0}
.q-product-link{color:#111;text-decoration:none;font-weight:600}
.q-product-content{display:flex;align-items:center;gap:10px;min-width:0}
.q-product-image{
    flex:0 0 52px;
    width:52px;
    height:52px;
    max-width:52px!important;
    max-height:52px!important;
    object-fit:contain;
    object-position:center;
    display:block!important;
    opacity:1!important;
    visibility:visible!important
}
.q-product-text{min-width:0;flex:1;overflow-wrap:anywhere}


.q-product{
    padding-right:12px;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:normal;
    hyphens:auto
}
.q-product small{
    display:block;
    margin-top:3px;
    color:#666;
    font-size:10px;
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere
}
.q-num{text-align:right;white-space:nowrap}
.q-page-ending{break-inside:avoid;page-break-inside:avoid}
.q-totals{
    width:315px;
    margin:22px 0 0 auto
}
.q-total-row{
    display:flex;
    justify-content:space-between;
    gap:24px;
    padding:6px 0;
    font-size:12px
}
.q-total-row strong{white-space:nowrap}
.q-total-row.q-final-row{
    margin-top:5px;
    padding-top:11px;
    border-top:2px solid #111;
    font-size:15px;
    font-weight:700
}
.q-notes{
    margin-top:20px;
    padding-top:12px;
    border-top:1px solid #ddd;
    white-space:normal;
    overflow-wrap:anywhere
}
.q-page-footer{
    position:absolute;
    left:50px;
    right:50px;
    bottom:28px;
    min-height:54px;
    padding-top:10px;
    border-top:1px solid #ddd;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:20px;
    align-items:end;
    color:#666;
    font-size:9.5px;
    line-height:1.35
}
.q-footer-text{
    min-width:0;
    max-height:42px;
    overflow:hidden;
    overflow-wrap:anywhere;
    white-space:normal
}
.q-page-number{white-space:nowrap;color:#888}


/* Saved company profile */
.mscq-persist-field{display:block}
.mscq-persist-control{position:relative;display:block}
.mscq-persist-control .mscq-company-field{padding-right:42px!important}
.mscq-persist-control .mscq-company-field[readonly]{background:#f7f7f7!important;color:#333!important;cursor:default}
.mscq-field-edit{
    position:absolute!important;
    right:6px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:6px!important;
    background:transparent!important;
    color:#555!important;
    box-shadow:none!important;
    font-size:17px!important;
    line-height:30px!important;
    text-align:center!important;
    cursor:pointer!important
}
.mscq-field-edit:hover{background:#ececec!important;color:#111!important}
.mscq-logo-profile{margin-bottom:12px}
.mscq-logo-preview{display:flex;align-items:center;min-height:0;margin-bottom:7px}
.mscq-logo-preview:empty{display:none}
.mscq-logo-preview img{display:block;max-width:180px;max-height:80px;object-fit:contain}
.mscq-logo-upload{display:inline-block!important;margin:0!important;font-size:12px!important;font-weight:600!important;cursor:pointer}
.mscq-logo-upload input[type=file]{display:block;margin-top:5px}
.mscq-profile-status{min-height:16px;margin-top:5px;font-size:11px;color:#2f7d32}
.mscq-profile-status.error{color:#b32d2e}

.mscq-footer-field small{
    display:block;
    margin-top:5px;
    color:#777;
    font-size:11px;
    font-weight:400;
    line-height:1.35
}

.mscq-success-overlay{
    position:fixed;
    inset:0;
    z-index:100001;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(0,0,0,.48)
}
.mscq-success-overlay.is-open{display:flex}
.mscq-success-modal{
    width:min(430px,calc(100vw - 32px));
    background:#fff;
    border-radius:14px;
    padding:30px 28px 24px;
    text-align:center;
    box-shadow:0 20px 60px rgba(0,0,0,.22)
}
.mscq-success-icon{
    width:56px;
    height:56px;
    margin:0 auto 16px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#eef8f0;
    color:#178a33;
    font-size:30px;
    font-weight:700
}
.mscq-success-modal h3{
    margin:0 0 8px;
    font-size:22px;
    line-height:1.25
}
.mscq-success-modal p{
    margin:0 0 22px;
    color:#666;
    font-size:14px;
    line-height:1.5
}
.mscq-success-modal .mscq-btn{min-width:130px}

.mscq-success-modal{position:relative}
.mscq-success-x{
 position:absolute!important;top:12px!important;right:14px!important;width:34px!important;height:34px!important;
 min-width:34px!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;
 background:transparent!important;color:#555!important;font-size:28px!important;font-weight:400!important;
 line-height:32px!important;text-align:center!important;cursor:pointer!important;box-shadow:none!important
}
.mscq-success-x:hover{background:#f2f2f2!important;color:#111!important}
