/* Medaś – pomocnik Medas Textile. Wszystkie klasy z prefiksem mdh-, aby nie kolidować z motywem. */

.mdh-root { position: fixed; right: 20px; bottom: 16px; z-index: 2147483000; font-family: inherit; color: #2A1A20; }
.mdh-root *, .mdh-tip *, .mdh-tip { box-sizing: border-box; }

.mdh-mascot { display: block; width: 96px; height: 96px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; border-radius: 20px; }
.mdh-mascot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mdh-root .mdh-mascot, .mdh-root .mdh-mascot:hover, .mdh-root .mdh-mascot:focus, .mdh-root .mdh-mascot:active { border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important; padding: 0 !important; }
.mdh-root .mdh-mascot:focus-visible { outline: 3px solid #8C1240 !important; outline-offset: 2px; }
.mdh-root button:focus-visible, .mdh-tip button:focus-visible { outline: 3px solid #8C1240; outline-offset: 2px; }

/* animacje Medasia */
.mdh-blink { transform-box: fill-box; transform-origin: center; animation: mdh-blink 4.2s infinite; }
@keyframes mdh-blink { 0%, 91%, 97%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
.mdh-look { animation: mdh-look 8s ease-in-out infinite; }
@keyframes mdh-look { 0%, 38%, 100% { transform: translateX(0); } 42%, 52% { transform: translateX(-3px); } 56%, 66% { transform: translateX(3px); } 70% { transform: translateX(0); } }
.mdh-smile { transform-box: fill-box; transform-origin: 50% 0%; animation: mdh-smile 7s ease-in-out infinite; }
@keyframes mdh-smile { 0%, 58%, 82%, 100% { transform: scale(1, 1); } 64%, 76% { transform: scale(1.2, 1.7); } }
.mdh-armL { transform-box: view-box; transform-origin: 62px 104px; animation: mdh-wave 1.8s ease-in-out infinite; }
@keyframes mdh-wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(18deg); } }
.mdh-armR { transform-box: view-box; transform-origin: 138px 104px; animation: mdh-sway 3s ease-in-out infinite; }
@keyframes mdh-sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-8deg); } }
.mdh-body { transform-box: fill-box; transform-origin: 50% 100%; }
.mdh-wiggle { animation: mdh-wiggle .6s ease-in-out 1; }
@keyframes mdh-wiggle { 0% { transform: rotate(0deg); } 25% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } 75% { transform: rotate(-2deg); } 100% { transform: rotate(0deg); } }
.mdh-cheer { transform-box: fill-box; transform-origin: 50% 100%; animation: mdh-cheer .9s ease-in-out infinite; }
@keyframes mdh-cheer { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.mdh-cheerL { transform-box: view-box; transform-origin: 62px 104px; animation: mdh-cheerL .9s ease-in-out infinite; }
.mdh-cheerR { transform-box: view-box; transform-origin: 138px 104px; animation: mdh-cheerR .9s ease-in-out infinite; }
@keyframes mdh-cheerL { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-12deg); } }
@keyframes mdh-cheerR { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(12deg); } }

/* dymek powitalny */
.mdh-bubble { position: absolute; right: 88px; bottom: 80px; min-width: 190px; background: #fff; border: 2px solid #8C1240; border-radius: 14px 14px 4px 14px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(42,26,32,.14); cursor: pointer; transform: scale(0); opacity: 0; transform-origin: 100% 100%; transition: transform .25s ease, opacity .25s ease; pointer-events: none; }
.mdh-bubble.mdh-show { transform: scale(1); opacity: 1; pointer-events: auto; }
.mdh-bubble p { margin: 0; }
.mdh-bubble-hello { font-size: 13px; font-weight: 500; color: #8C1240; }
.mdh-bubble-ask { font-size: 15px; font-weight: 600; color: #2A1A20; }

/* panel z tematami */
.mdh-panel { position: absolute; right: 4px; bottom: 112px; width: 370px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid #EADFD8; border-radius: 18px; box-shadow: 0 18px 48px rgba(42,26,32,.18); overflow: hidden; animation: mdh-in .22s ease-out 1; transform-origin: 100% 100%; }
.mdh-panel[hidden] { display: none; }
@keyframes mdh-in { 0% { opacity: 0; transform: translateY(8px) scale(.97); } 100% { opacity: 1; transform: none; } }
.mdh-panel-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 14px 14px 20px; border-bottom: 1px solid #F2E9E4; }
.mdh-panel-titles { flex-grow: 1; }
.mdh-panel-titles p { margin: 0; }
.mdh-panel-hello { font-size: 13px; font-weight: 500; color: #8C1240; }
.mdh-panel-ask { font-size: 21px; font-weight: 700; color: #2A1A20; line-height: 1.25; }
.mdh-icon-btn { width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 10px; background: transparent; color: #5A4A50; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.mdh-icon-btn:hover { background: #F4EEEA; }

.mdh-topics { position: relative; padding: 8px; }
.mdh-topics::before { content: ""; position: absolute; left: 33px; top: 36px; bottom: 34px; border-left: 2px dashed #C99AAB; }
.mdh-topic { position: relative; width: 100%; min-height: 58px; border: 0; border-radius: 12px; padding: 8px 12px; margin: 0; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; background: #fff; font: inherit; color: inherit; }
.mdh-topic:hover { background: #FBF1F4; }
.mdh-dot { position: relative; width: 28px; height: 28px; flex-shrink: 0; border-radius: 14px; background: #fff; border: 2.5px solid #8C1240; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #8C1240; }
.mdh-dot-on { background: #8C1240; color: #fff; }
.mdh-topic-words { display: flex; flex-direction: column; gap: 2px; }
.mdh-topic-title { font-size: 15px; font-weight: 600; color: #2A1A20; }
.mdh-topic-sub { font-size: 13px; color: #6B5A60; }

.mdh-intro { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.mdh-intro-row { display: flex; align-items: center; gap: 12px; }
.mdh-intro-title { margin: 0; font-size: 17px; font-weight: 600; }
.mdh-intro-text { margin: 0; font-size: 14px; line-height: 1.5; color: #4A3A40; }

.mdh-panel-foot { padding: 12px 20px 14px; background: #FBF7F4; border-top: 1px solid #F2E9E4; }
.mdh-panel-foot p { margin: 0; font-size: 12px; line-height: 1.45; color: #5A4A50; }

.mdh-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mdh-btn { min-height: 40px; padding: 0 16px; border: 1px solid #D9CDC6; border-radius: 10px; background: #fff; color: #5A4A50; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.mdh-btn-primary { border-color: #8C1240; background: #8C1240; color: #fff; font-weight: 600; }
.mdh-btn-primary:hover { background: #6E0E33; border-color: #6E0E33; }

/* przewodnik */
.mdh-ring { position: fixed; z-index: 2147482990; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(42,26,32,.55); pointer-events: none; transition: left .45s ease, top .45s ease, width .45s ease, height .45s ease; }
.mdh-ring[hidden] { display: none; }
.mdh-stitch { position: fixed; left: 0; top: 0; z-index: 2147482995; pointer-events: none; overflow: visible; }

.mdh-tip { position: fixed; z-index: 2147483001; width: 320px; max-width: calc(100vw - 24px); background: #fff; color: #2A1A20; border-radius: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.3); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; animation: mdh-in .3s ease-out 1; font-family: inherit; }
.mdh-tip[hidden] { display: none; }
.mdh-tip p { margin: 0; }
.mdh-tip-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); animation: none; width: 360px; }
.mdh-tip-done { align-items: center; text-align: center; padding: 22px 24px; }
.mdh-tip-done .mdh-actions { justify-content: center; }
.mdh-done-pic { width: 130px; height: 130px; }
.mdh-done-pic svg { width: 100%; height: 100%; }
.mdh-tip-head { display: flex; align-items: center; gap: 10px; }
.mdh-tip-kicker { flex-grow: 1; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #8C1240; }
.mdh-tip-title { font-size: 16px; font-weight: 600; }
.mdh-tip-text { font-size: 14px; line-height: 1.5; color: #4A3A40; }
.mdh-tip-hint { font-size: 12.5px; color: #6B5A60; font-style: italic; }
.mdh-progress { position: relative; display: flex; gap: 14px; }
.mdh-progress::before { content: ""; position: absolute; left: 5px; right: 5px; top: 4px; border-top: 2px dashed #C99AAB; }
.mdh-pdot { position: relative; width: 10px; height: 10px; border-radius: 5px; border: 2px solid #8C1240; background: #fff; }
.mdh-pdot-on { background: #8C1240; }

/* telefon */
@media (max-width: 600px) {
  .mdh-root { right: 10px; bottom: 10px; }
  .mdh-mascot { width: 68px; height: 68px; }
  .mdh-bubble { right: 62px; bottom: 56px; }
  .mdh-panel { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-width: none; border-radius: 22px 22px 0 0; max-height: 85vh; overflow-y: auto; }
  .mdh-topic-sub { display: none; }
  .mdh-tip { width: calc(100vw - 24px); }
  .mdh-tip-center { width: calc(100vw - 24px); }
}



@media print { .mdh-root, .mdh-ring, .mdh-stitch, .mdh-tip { display: none !important; } }
