/* Oznámení WooCommerce (košík, pokladna, účet, přihlášení) ve stylu webu: bílá karta, tenký okraj, barevný pruh vlevo, kulatá ikona,
   černé tlačítko. Zlatý = informace, zelený = povedlo se, červený = chyba. Platí pro bloková oznámení i pro klasická. */
body{--eg-n-info:#d59d10;--eg-n-info-bg:#fbf3dc;--eg-n-ok:#4d7a1f;--eg-n-ok-bg:#eef3e6;--eg-n-err:#b3261e;--eg-n-err-bg:#fbeceb}

body .wc-block-components-notice-banner,
body .woocommerce-message,body .woocommerce-info,body .woocommerce-error{
  --eg-n:var(--eg-n-info);--eg-nbg:var(--eg-n-info-bg);
  display:flex;align-items:center;gap:14px;box-sizing:border-box;margin:0 0 16px;padding:14px 18px;
  background:#fff;color:#111;border:1px solid #e3dfd2;border-left:5px solid var(--eg-n);border-radius:.5rem;
  font-family:inherit;font-size:1rem;line-height:1.5;list-style:none;
}
body .wc-block-components-notice-banner.is-success,body .woocommerce-message{--eg-n:var(--eg-n-ok);--eg-nbg:var(--eg-n-ok-bg)}
body .wc-block-components-notice-banner.is-error,body .woocommerce-error{--eg-n:var(--eg-n-err);--eg-nbg:var(--eg-n-err-bg)}
body .wc-block-components-notice-banner.is-warning{--eg-n:var(--eg-n-info);--eg-nbg:var(--eg-n-info-bg)}
/* The variants of WooCommerce set their own background and border colour: the same weight here wins over them. */
body .wc-block-components-notice-banner.is-info,body .wc-block-components-notice-banner.is-success,body .wc-block-components-notice-banner.is-error,body .wc-block-components-notice-banner.is-warning{background-color:#fff;border-color:#e3dfd2;border-left-color:var(--eg-n)}
body .wc-block-components-notice-banner.is-info>svg,body .wc-block-components-notice-banner.is-success>svg,body .wc-block-components-notice-banner.is-error>svg,body .wc-block-components-notice-banner.is-warning>svg{background-color:var(--eg-nbg);fill:var(--eg-n);color:var(--eg-n)}

/* Ikona: kulatý světlý podklad, znak v barvě pruhu */
body .wc-block-components-notice-banner>svg{flex:none;box-sizing:content-box;width:20px;height:20px;padding:8px;border-radius:50%;background-color:var(--eg-nbg);fill:var(--eg-n);color:var(--eg-n)}
body .woocommerce-message::before,body .woocommerce-info::before,body .woocommerce-error::before{
  content:"";flex:none;position:static;width:20px;height:20px;padding:8px;border-radius:50%;background-color:var(--eg-nbg);
  background-position:center;background-repeat:no-repeat;background-size:20px 20px;color:var(--eg-n);float:none;margin:0;top:auto;left:auto;
  box-sizing:content-box;
}

body .woocommerce-info::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d59d10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8v.01'/%3E%3C/svg%3E")}
body .woocommerce-message::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d7a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E")}
body .woocommerce-error::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3261e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E")}

/* Text a seznam chyb */
body .wc-block-components-notice-banner__content{flex:1;min-width:0;display:flex;flex-wrap:nowrap;align-items:center;gap:6px 14px;font-size:inherit;line-height:inherit}
body .wc-block-components-notice-banner__content:has(ul){flex-wrap:wrap}
body .wc-block-components-notice-banner__content ul,body .woocommerce-error{margin:0}
body .wc-block-components-notice-banner__content ul{flex:1 0 100%;padding-left:1.1rem;list-style:disc}
body ul.woocommerce-error{position:relative;display:block;padding:14px 18px 14px 70px}
body ul.woocommerce-error::before{position:absolute;left:18px;top:14px}
body ul.woocommerce-error li{margin:.15rem 0}
body .wc-block-components-notice-banner__content li{margin:.15rem 0}

/* Akce v oznámení (Odeslat znovu, Zpět do obchodu, Zobrazit košík) jako černé tlačítko vpravo */
body .wc-block-components-notice-banner__content .button,body .wc-block-components-notice-banner__content .wp-element-button,
body .woocommerce-message .button,body .woocommerce-info .button,body .woocommerce-error .button{
  order:2;margin:0 0 0 auto;padding:8px 20px;background:#111;color:#f9f9f9;border:0;border-radius:.33rem;font-size:.9rem;font-weight:500;line-height:1.3;text-decoration:none;white-space:nowrap;float:none;
}
body .wc-block-components-notice-banner__content .button:hover,body .wc-block-components-notice-banner__content .wp-element-button:hover,
body .woocommerce-message .button:hover,body .woocommerce-info .button:hover,body .woocommerce-error .button:hover{background:#333;color:#f9f9f9}
body .wc-block-components-notice-banner a:not(.button):not(.wp-element-button){color:#111;text-underline-offset:.2em}
body .wc-block-components-notice-banner .button:focus-visible,body .woocommerce-message .button:focus-visible,body .woocommerce-info .button:focus-visible{outline:3px solid #d59d10;outline-offset:3px}

/* Zavírací křížek bloků */
body .wc-block-components-notice-banner .wc-block-components-notice-banner__dismiss{flex:none;margin-left:auto;padding:4px;background:none;border:0;color:var(--eg-n);cursor:pointer}

@media (max-width:560px){
  body .wc-block-components-notice-banner,body .woocommerce-message,body .woocommerce-info{flex-wrap:wrap}
  body .wc-block-components-notice-banner__content{flex-basis:calc(100% - 52px)}
  body .wc-block-components-notice-banner__content .button,body .woocommerce-message .button,body .woocommerce-info .button{margin-left:0}
}
