/* Gualamba V29 commercial workflow; inherits existing design tokens. */
.g29-overlay{position:fixed;inset:0;z-index:100500;display:flex;align-items:center;justify-content:center;padding:15px;background:rgba(7,20,18,.74);overflow:auto;overscroll-behavior:contain}
.g29-overlay[hidden],.g29-panel[hidden]{display:none!important}
.g29-dialog{width:min(620px,100%);max-height:min(93dvh,950px);overflow-y:auto;background:var(--card,#fff);color:var(--text,#173326);border:1px solid var(--border,#d3dbd7);border-radius:17px;padding:clamp(18px,3.5vw,28px);box-shadow:0 30px 95px #0005}
.g29-head{display:flex;align-items:start;gap:12px;justify-content:space-between}.g29-head h2{margin:0 0 5px;font-size:clamp(1.3rem,3.5vw,1.65rem)}.g29-head .secondary{flex:0 0 auto}
.g29-sub{font-size:.88rem;opacity:.75;margin:4px 0 16px}.g29-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.g29-field{display:grid;gap:5px;margin:10px 0}.g29-field label{font-size:.88rem;font-weight:700}.g29-field input,.g29-field select,.g29-field textarea{box-sizing:border-box;max-width:100%;width:100%;min-width:0;padding:10px;border:1px solid #8caaa0;border-radius:9px;background:var(--card,#fff);color:var(--text,#173326);font:inherit}.g29-field textarea{resize:vertical;min-height:75px}
.g29-choice{display:flex;gap:12px;align-items:flex-start;background:var(--soft,#f1f6f3);padding:12px;border:1px solid #b9cfc6;border-radius:10px;margin:8px 0}.g29-choice input{margin-top:4px}.g29-choice strong{display:block}.g29-choice small{display:block;opacity:.75}.g29-terms{padding:12px;background:var(--soft,#eff5f0);border-radius:10px;font-size:.86rem;line-height:1.5}.g29-check{display:flex;gap:10px;align-items:flex-start;margin:12px 0;font-weight:500;font-size:.85rem}.g29-check input{margin-top:4px;flex:0 0 auto}.g29-feedback{padding:10px;border-radius:8px;min-height:24px;background:var(--soft,#f1f6f3);margin:12px 0}.g29-feedback:empty{display:none}.g29-feedback.error{color:#a33125;background:#fff2f1}
.g29-admin{padding:14px 0 20px}.g29-admin h3{margin:0 0 8px}.g29-admin-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px}.g29-admin-head button{flex:0 0 auto}.g29-card{border:1px solid var(--border,#bdcfc3);padding:16px;border-radius:12px;margin:12px 0;background:var(--card,#fff)}.g29-meta{font-size:.85rem;opacity:.8;line-height:1.7}.g29-tag{display:inline-block;font-size:.73rem;padding:3px 8px;border:1px solid #9eb3a4;border-radius:999px;white-space:nowrap}.g29-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.g29-admin select,.g29-admin input,.g29-admin textarea{max-width:100%;padding:8px 10px;border:1px solid #a2b6ac;border-radius:8px;background:var(--card,#fff);color:var(--text,#173326);font:inherit;box-sizing:border-box}.g29-admin label{display:grid;gap:4px;font-size:.85rem;font-weight:600}.g29-mini-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.g29-mini-form .g29-wide{grid-column:1/-1}.g29-detail{margin-top:10px}.g29-detail summary{cursor:pointer;font-weight:600}.g29-admin .primary,.g29-admin .secondary{cursor:pointer}.g29-help{font-size:.81rem;opacity:.76;margin-top:6px}
@media(max-width:640px){.g29-grid,.g29-mini-form{grid-template-columns:1fr}.g29-dialog{max-height:95dvh;padding:16px}.g29-overlay{align-items:flex-start;padding:10px}.g29-head .secondary{font-size:.8rem}}

/* V29.1: contrastes independientes del tema y controles de fleteros */
.g29-admin .g29-card{background:var(--card,#fff);color:var(--text,#173326)}
.g29-admin .g29-card h4,.g29-admin .g29-card strong,.g29-admin .g29-card p,.g29-admin .g29-card label,.g29-admin .g29-card summary,.g29-admin .g29-card .g29-meta{color:var(--text,#173326)}
.g29-admin .g29-actions details{flex:1 1 100%}.g29-admin .g29-actions details summary{margin-top:6px}
.g29-admin .g29-tag{color:inherit}
html[data-theme="dark"] .g29-admin .g29-card{background:#14241c!important;color:#edf5ef!important;border-color:#375648!important}
html[data-theme="dark"] .g29-admin .g29-card :is(h4,strong,label,summary,.g29-meta,p){color:#edf5ef!important}
html[data-theme="dark"] .g29-admin .g29-help{color:#c7d8ce!important;opacity:1}
html[data-theme="light"] .g29-admin .g29-card{background:#fff!important;color:#173326!important}
html[data-theme="light"] .g29-admin .g29-card :is(h4,strong,label,summary,.g29-meta,p){color:#173326!important}
html[data-theme="light"] .g29-admin .g29-help{color:#4a6557!important;opacity:1}


/* V29.3 — user-visible commercial education and responsive optional freight */
.g293-dialog{width:min(620px,100%);max-width:100%;min-width:0;overflow-x:hidden;overflow-wrap:break-word;background:#f7f5ed;color:#163729;box-sizing:border-box}
.g293-dialog *,#g29Purchase .g29-dialog *{box-sizing:border-box}
.g293-eyebrow{font-size:.77rem;font-weight:800;letter-spacing:.08em;color:#956526}
.g293-intro{line-height:1.58;margin:14px 0 18px}
.g293-transport{padding:0;margin:14px 0;border:0;min-width:0}
.g293-transport legend{font-size:1.04rem;font-weight:800;padding:0 0 6px}
.g293-option{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:12px;padding:14px 12px;margin:10px 0;background:#fff;border:1px solid #c1d1c7;border-radius:13px;color:#183b2c;min-width:0;cursor:pointer;line-height:1.45}
.g293-option input[type="radio"]{width:19px!important;min-width:19px!important;max-width:19px!important;height:19px!important;flex:0 0 19px!important;display:inline-block!important;margin:3px 0 0;padding:0;accent-color:#1e6247}
.g293-option span{flex:1 1 auto;min-width:0}
.g293-option strong,.g293-option small{display:block;color:inherit}
.g293-option small{font-size:.86rem;margin-top:3px;opacity:.87}
.g293-disclosure{background:#dce9de;color:#17422c;border-radius:10px;padding:12px;font-size:.87rem;line-height:1.5;margin-bottom:14px}
.g293-steps{margin:18px 0}.g293-steps h3{font-size:1.05rem;margin:0 0 5px}.g293-steps ol{margin:0;padding-left:22px;line-height:1.7}
.g293-warning{font-size:.84rem;line-height:1.52;color:#53695d}
.g293-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:9px;margin-top:18px}.g293-actions button{cursor:pointer;min-width:0;white-space:normal;text-align:center}
.g293-gate{font-size:.79rem;line-height:1.5;color:#53695d;margin-top:9px}
.g293-learn{font-size:.85rem;margin-top:8px;white-space:normal!important;text-align:center}
.g29-dialog{max-width:100%;min-width:0;box-sizing:border-box;overflow-x:hidden;overflow-wrap:anywhere}
#g29Purchase .g29-choice{display:flex!important;flex-direction:row!important;align-items:flex-start;min-width:0}
#g29Purchase .g29-choice input[type="radio"],#g29Purchase .g29-check input[type="checkbox"]{width:19px!important;min-width:19px!important;max-width:19px!important;height:19px!important;flex:0 0 19px!important;margin:4px 0 0;accent-color:#28684e;display:inline-block!important}
#g29Purchase .g29-choice span,#g29Purchase .g29-check span{flex:1 1 auto;min-width:0}
#g29Purchase .g29-terms,#g29Purchase .g29-choice{background:#e5efe8;color:#163a29}
html[data-theme="dark"] .g293-dialog{background:#10281d;color:#eef6ee;border-color:#527566}
html[data-theme="dark"] .g293-eyebrow{color:#e8b871}
html[data-theme="dark"] .g293-option{background:#132b20;color:#f1f7f0;border-color:#426a58}
html[data-theme="dark"] .g293-disclosure{background:#1b3a2c;color:#eaf2e8}
html[data-theme="dark"] .g293-warning,html[data-theme="dark"] .g293-gate{color:#d2ded5}
html[data-theme="dark"] #g29Purchase .g29-dialog{background:#10281d;color:#eef6ee}
html[data-theme="dark"] #g29Purchase .g29-terms,html[data-theme="dark"] #g29Purchase .g29-choice{background:#19382a;color:#eef6ee;border-color:#416a55}
html[data-theme="dark"] #g29Purchase .g29-field input,html[data-theme="dark"] #g29Purchase .g29-field textarea{background:#081d15;color:#f5f7f4;border-color:#527565}
@media(max-width:640px){.g293-dialog{max-height:calc(100dvh - 20px);width:100%;padding:18px;overflow-y:auto}.g293-option{padding:12px}.g293-actions{display:grid;grid-template-columns:1fr}.g293-actions button{width:100%}.g293-steps ol{padding-left:20px}.g29-head{flex-wrap:wrap}#g29Purchase .g29-dialog{max-height:calc(100dvh - 20px);width:100%;overflow-y:auto}.g29-overlay{overflow-x:hidden}.g293-gate{margin-bottom:0}}

/* Consistent dialog heading: keep close action visible on narrow devices. */
.g293-dialog .g29-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px}
.g293-dialog .g29-head>div{min-width:0}
.g293-dialog .g29-head .secondary{font-size:.85rem;padding:9px 11px}
@media(max-width:390px){.g293-dialog .g29-head h2{font-size:1.22rem;line-height:1.22}.g293-dialog .g29-head .secondary{padding:9px 8px;font-size:.8rem}}
