/* MAS v5: COA library + support assistant */

/* ---------- COA library ---------- */
.mas-coa-tools{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.mas-coa-search{flex:1 1 320px;max-width:460px;display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--mas-paper-line);border-radius:999px;padding:0 18px;color:#55625B}
.mas-coa-search input{flex:1;border:0!important;outline:none!important;box-shadow:none!important;background:transparent!important;height:48px;padding:0!important;font:500 15px var(--mas-body);color:var(--mas-ink)}
.mas-coa-filter{display:flex;gap:4px;padding:4px;border-radius:999px;background:var(--mas-paper);border:1px solid var(--mas-paper-line)}
.mas-coa-filter button{border:0;background:transparent;border-radius:999px;padding:10px 16px;font:600 13.5px/1 var(--mas-head);color:#33402F;cursor:pointer}
.mas-coa-filter button.is-active{background:var(--mas-btn);color:#fff}
.mas-coa-list{display:flex;flex-direction:column;gap:12px}
.mas-coa-row{display:grid;grid-template-columns:minmax(220px,1.1fr) minmax(0,2fr) auto;align-items:center;gap:24px;background:var(--mas-paper);border:1px solid var(--mas-paper-line);border-radius:20px;padding:14px 18px 14px 14px;transition:border-color .2s,box-shadow .2s}
.mas-coa-row:hover{border-color:#C6D0BC;box-shadow:0 20px 40px -30px rgba(30,58,34,.4)}
.mas-coa-row[hidden]{display:none}
.mas-coa-prod{display:flex;align-items:center;gap:14px;text-decoration:none!important;min-width:0}
.mas-coa-thumb{flex:0 0 64px;width:64px!important;height:64px!important;border-radius:14px;object-fit:cover;background:#1C3A20;display:block}
.mas-coa-prod b{display:block;font:700 18px/1.2 var(--mas-head);color:#22381F;text-transform:uppercase}
.mas-coa-prod small{display:block;font:500 13px/1.3 var(--mas-body);color:#5E6B5A;margin-top:3px}
.mas-coa-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}
.mas-coa-meta div{min-width:0}
.mas-coa-meta dt{font:700 11px/1 var(--mas-body);letter-spacing:.12em;text-transform:uppercase;color:#7A8676;margin:0 0 6px}
.mas-coa-meta dd{margin:0;font:600 14.5px/1.3 var(--mas-head);color:#22381F;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mas-coa-act{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.mas-coa-status{display:inline-flex;align-items:center;gap:7px;font:600 12px/1 var(--mas-head);color:#7A6A3E}
.mas-coa-status:before{content:'';width:7px;height:7px;border-radius:50%;background:#C99A3B}
.mas-coa-row.is-ready .mas-coa-status{color:#3F6B2C}
.mas-coa-row.is-ready .mas-coa-status:before{background:#6F8F57}
.mas-coa-act .mas-cbtn{min-width:150px}
.mas-coa-empty{padding:30px;text-align:center;color:#55625B;border:1px dashed var(--mas-paper-line);border-radius:20px;margin:0}
.mas-coa-steps .mas-panel.e-con{background:var(--mas-paper)!important;border-color:var(--mas-paper-line)!important;border-radius:20px}
@media(min-width:1025px){.mas-coa-steps>.e-con{flex:1 1 0}}
.mas-pdp-coa{display:block;width:100%;margin-top:6px;font-size:14px}
.mas-pdp-coa a{color:#22381F;font-weight:600;text-decoration:underline;text-underline-offset:3px}
@media(max-width:921px){
 .mas-coa-row{grid-template-columns:1fr auto;gap:14px}
 .mas-coa-meta{grid-column:1/-1;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr));padding-top:12px;border-top:1px solid var(--mas-paper-line)}
}
@media(max-width:600px){
 .mas-coa-row{grid-template-columns:1fr;padding:14px}
 .mas-coa-meta{grid-row:auto}
 .mas-coa-act{flex-direction:row;justify-content:space-between;align-items:center}
 .mas-coa-act .mas-cbtn{min-width:0}
 .mas-coa-filter{width:100%}.mas-coa-filter button{flex:1}
}

/* ---------- Support assistant ---------- */
#ast-scroll-top{right:96px!important;bottom:28px!important;border-radius:50%!important;width:44px;height:44px;background:#14301A!important}
.mas-bot-fab{position:fixed;right:22px;bottom:22px;z-index:99990;display:inline-flex;align-items:center;gap:10px;height:56px;padding:0 20px 0 16px;border:0;border-radius:999px;background:#14301A;color:#fff;font:600 15px/1 var(--mas-head);box-shadow:0 18px 40px -16px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.08) inset;cursor:pointer;transition:transform .2s,background .2s}
.mas-bot-fab:hover{background:#1C3E22;transform:translateY(-2px)}
.mas-bot-fab .dot{width:10px;height:10px;border-radius:50%;background:var(--mas-lime);box-shadow:0 0 0 4px rgba(163,217,59,.22)}
.mas-bot-fab svg{width:22px;height:22px}
.mas-bot-open .mas-bot-fab{opacity:0;pointer-events:none;transform:scale(.9)}
.mas-bot{position:fixed;right:22px;bottom:22px;z-index:99991;width:390px;max-width:calc(100vw - 24px);height:min(620px,calc(100vh - 44px));display:flex;flex-direction:column;border-radius:26px;overflow:hidden;background:#F5F6EF;box-shadow:0 40px 90px -30px rgba(0,0,0,.55),0 0 0 1px rgba(0,0,0,.06);opacity:0;transform:translateY(14px) scale(.98);transform-origin:bottom right;pointer-events:none;transition:opacity .2s,transform .2s}
.mas-bot-open .mas-bot{opacity:1;transform:none;pointer-events:auto}
.mas-bot-head{display:flex;align-items:center;gap:12px;padding:16px 16px 16px 18px;color:#fff;background:#0A1A0E;background-image:radial-gradient(70% 140% at 0% 0%,rgba(112,150,46,.5),rgba(20,42,22,0) 70%),linear-gradient(180deg,#14301A,#0A1A0E)}
.mas-bot-ava{flex:0 0 40px;height:40px;border-radius:12px;background:rgba(255,255,255,.1);display:flex;align-items:center;justify-content:center}
.mas-bot-ava img{width:26px;height:auto}
.mas-bot-title{flex:1;min-width:0}
.mas-bot-title b{display:block;font:600 16px/1.2 var(--mas-head)}
.mas-bot-title small{display:flex;align-items:center;gap:6px;font:500 12.5px/1.2 var(--mas-body);color:rgba(241,245,236,.75);margin-top:3px}
.mas-bot-title small:before{content:'';width:7px;height:7px;border-radius:50%;background:var(--mas-lime)}
.mas-bot-x{width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.1);color:#fff;font-size:22px;line-height:1;cursor:pointer}
.mas-bot-x:hover{background:rgba(255,255,255,.18)}
.mas-bot-log{flex:1;overflow-y:auto;padding:18px 16px 8px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth}
.mas-msg{max-width:86%;padding:11px 14px;border-radius:18px;font:400 14.5px/1.5 var(--mas-body);color:#22381F;word-wrap:break-word}
.mas-msg p{margin:0 0 6px;font-size:14.5px!important;line-height:1.5!important}
.mas-msg p:last-child{margin:0}
.mas-msg a{color:#22381F;font-weight:600;text-decoration:underline;text-underline-offset:2px}
.mas-msg ul{margin:4px 0;padding-left:18px}
.mas-msg--bot{align-self:flex-start;background:#fff;border:1px solid #E1E6D8;border-bottom-left-radius:6px}
.mas-msg--me{align-self:flex-end;background:#1C3A20;color:#fff;border-bottom-right-radius:6px}
.mas-msg--me a{color:#fff}
.mas-typing{display:inline-flex;gap:4px;padding:14px 16px}
.mas-typing i{width:7px;height:7px;border-radius:50%;background:#9AA694;animation:mas-b 1s infinite}
.mas-typing i:nth-child(2){animation-delay:.15s}.mas-typing i:nth-child(3){animation-delay:.3s}
@keyframes mas-b{0%,60%,100%{opacity:.35;transform:none}30%{opacity:1;transform:translateY(-3px)}}
.mas-bot-cards{display:flex;flex-direction:column;gap:8px;align-self:stretch}
.mas-bot-card{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #E1E6D8;border-radius:16px;padding:8px 12px 8px 8px;text-decoration:none!important;color:#22381F}
.mas-bot-card img{width:48px;height:48px;border-radius:10px;object-fit:cover;background:#1C3A20}
.mas-bot-card b{display:block;font:700 14.5px/1.2 var(--mas-head);text-transform:uppercase}
.mas-bot-card small{display:block;font-size:12.5px;color:#5E6B5A;margin-top:2px}
.mas-bot-card span{flex:1;min-width:0}
.mas-bot-card em{font:600 14px var(--mas-head);font-style:normal}
.mas-bot-chips{display:flex;flex-wrap:wrap;gap:6px;padding:4px 16px 10px}
.mas-bot-chips button{border:1px solid #CBD3C1;background:#fff;color:#22381F;border-radius:999px;padding:8px 12px;font:600 12.5px/1 var(--mas-head);cursor:pointer}
.mas-bot-chips button:hover{background:#1C3A20;color:#fff;border-color:#1C3A20}
.mas-bot-form{display:flex;align-items:flex-end;gap:8px;padding:12px;border-top:1px solid #E1E6D8;background:#fff}
.mas-bot-form textarea{flex:1;resize:none;border:1px solid #DDE3D4!important;border-radius:16px!important;padding:12px 14px!important;max-height:110px;min-height:46px;font:400 14.5px/1.4 var(--mas-body)!important;color:#22381F;background:#F7F8F3!important;outline:none!important;box-shadow:none!important}
.mas-bot-form textarea:focus{border-color:#1C3A20!important;background:#fff!important}
.mas-bot-send{flex:0 0 46px;height:46px;border-radius:50%;border:0;background:#1C3A20;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.mas-bot-send:disabled{opacity:.4;cursor:default}
.mas-bot-foot{font:400 11.5px/1.3 var(--mas-body);color:#7A8676;text-align:center;padding:0 12px 10px;background:#fff;margin:0}
@media(max-width:600px){
 .mas-bot-fab{right:14px;bottom:14px;height:52px;padding:0 16px 0 14px}
 .mas-bot-fab .lbl{display:none}
 .mas-bot-fab{width:52px;padding:0;justify-content:center}
 .mas-bot-fab .dot{position:absolute;top:10px;right:10px;width:9px;height:9px}
 .mas-bot{right:0;bottom:0;width:100%;max-width:100%;height:100dvh;border-radius:0}
 #ast-scroll-top{right:76px!important;bottom:18px!important}
}

/* ---------- Chat polish (v5.1) ---------- */
.mas-bot button{font-family:var(--mas-head)!important;box-shadow:none!important;letter-spacing:0!important;text-transform:none!important;line-height:1!important;margin:0!important}
.mas-bot .mas-bot-x,.mas-bot .mas-bot-send{padding:0!important;min-width:0!important;min-height:0!important;flex-shrink:0;display:inline-flex!important;align-items:center;justify-content:center;border-radius:50%!important;aspect-ratio:1/1}
.mas-bot .mas-bot-x{width:34px!important;height:34px!important;background:rgba(255,255,255,.12)!important;color:#fff!important;font-size:0!important;border:0!important}
.mas-bot .mas-bot-x:before{content:'';width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/contain no-repeat}
.mas-bot .mas-bot-x:hover{background:rgba(255,255,255,.22)!important}
.mas-bot .mas-bot-send{width:44px!important;height:44px!important;background:#1C3A20!important;color:#fff!important;border:0!important;transition:background .2s,transform .15s}
.mas-bot .mas-bot-send:not(:disabled):hover{background:#14301A!important}
.mas-bot .mas-bot-send:not(:disabled):active{transform:scale(.94)}
.mas-bot .mas-bot-send:disabled{background:#C9D1C1!important;opacity:1}
.mas-bot .mas-bot-send svg{width:18px;height:18px}
.mas-bot-form{align-items:center!important;padding:10px 12px!important;gap:8px}
.mas-bot-form textarea{min-height:44px!important;padding:11px 16px!important;border-radius:22px!important}
.mas-bot .mas-bot-chips button{padding:8px 12px!important;border-radius:999px!important;background:#fff!important;color:#22381F!important;border:1px solid #CBD3C1!important;font-size:12.5px!important;font-weight:600!important}
.mas-bot .mas-bot-chips button:hover{background:#1C3A20!important;color:#fff!important;border-color:#1C3A20!important}
.mas-bot-head{padding:14px 14px 14px 16px!important}
.mas-bot-ava{border-radius:50%!important;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.14)}
.mas-bot-title small.is-ai:after{content:'AI';margin-left:4px;font:700 10px/1 var(--mas-head);letter-spacing:.06em;padding:3px 6px;border-radius:999px;background:rgba(163,217,59,.2);color:var(--mas-lime)}
.mas-bot-log{background:#F5F6EF}
.mas-bot-fab{font-family:var(--mas-head)!important;padding:0 20px 0 16px!important;line-height:1!important;letter-spacing:0!important;text-transform:none!important}
.mas-bot-fab:focus-visible,.mas-bot button:focus-visible{outline:2px solid var(--mas-lime)!important;outline-offset:2px}
@media(max-width:600px){.mas-bot-fab{padding:0!important}}

/* ---------- Gallery: 3 tiles ---------- */
.mas-mosaic{grid-template-columns:1.4fr 1fr 1fr!important;grid-auto-rows:300px!important}
.mas-mosaic .mas-tile{grid-column:auto!important;grid-row:auto!important}
@media(max-width:767px){.mas-mosaic{grid-template-columns:1fr 1fr!important;grid-auto-rows:170px!important}.mas-mosaic .mas-tile:first-child{grid-column:1/-1!important;grid-row:auto!important}}
.mas-bot .mas-bot-send{flex:0 0 44px!important;max-width:44px}
.mas-bot .mas-bot-x{flex:0 0 34px!important}
