/*
 * ++++++++++++++++++++++
 * Add to Calendar Button
 * ++++++++++++++++++++++
 *
 * Style: Default
 *
 * Version: 2.2.3
 * Creator: Jens Kuerschner (https://jenskuerschner.de)
 * Project: https://github.com/add2cal/add-to-calendar-button
 * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
 * Note:    DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
 * 
 */

/******************************
 * Global colors and shadows
 */

:host {
  width: fit-content;

  --base-font-size-l: 16px;
  --base-font-size-m: 16px;
  --base-font-size-s: 16px;
  --font: arial, helvetica, sans-serif;
  --keyboard-focus: #1e90ff;
  --btn-background: #f5f5f5;
  --btn-background-hover: #fff;
  --btn-border: #d2d2d2;
  --btn-text: #333;
  --btn-text-hover: #000;
  --btn-shadow: transparent;
  --btn-shadow-hover: transparent;
  --btn-shadow-active: transparent;
  --list-background: #f5f5f5;
  --list-background-hover: #fff;
  --list-text: #333;
  --list-text-hover: #000;
  --list-close-background: #e5e5e5;
  --list-close-text: #777;
  --list-shadow: rgba(0 0 0 / 20%) 2px 5px 18px -1px, rgba(0 0 0 / 40%) 2px 2px 10px -3px;
  --list-shadow-modal: rgba(0 0 0 / 60%) 3px 6px 40px -5px, rgba(0 0 0 / 60%) 3px 3px 15px -4px;
  --modal-text: #000;
  --modal-background: #f5f5f5;
  --modal-btn-bar: #c6c8cd;
  --modal-btn-background: #f5f5f5;
  --modal-btn-secondary-background: #e2e1e6;
  --modal-btn-background-hover: #fff;
  --modal-btn-text: #2e2e2e;
  --modal-btn-text-hover: #161616;
  --modal-btn-secondary-text: #666567;
  --modal-shadow: drop-shadow(5px 8px 30px rgba(0 0 0 / 70%));
  --modal-shadow-btn: rgba(0 0 0 / 10%) 2px 3px 10px -3px,rgba(0 0 0 / 25%) 1px 1px 8px -4px;
  --modal-shadow-btn-hover: rgba(0 0 0 / 35%) 3px 5px 15px -2px,rgba(0 0 0 / 20%) 2px 4px 25px -6px;
  --date-btn-text: #1d1d1e;
  --date-btn-text-secondary: #3a3a3f;
  --date-btn-cal-day-text: #fff;
  --date-btn-cal-month-text: #d3d2d7;
  --date-btn-cal-background: #313132;
  --date-btn-background: #eae9ed;
  --date-btn-background-hover: #fff;
  --date-btn-shadow: rgba(0 0 0 / 40%) 1px 3px 15px -4px, rgba(0 0 0 / 20%) 1px 1px 8px -4px;
  --date-btn-shadow-hover: rgba(0 0 0 / 40%) 4px 6px 18px -1px, rgba(0 0 0 / 35%) 4px 5px 25px -2px;
  --checkmark-background: radial-gradient(circle,#fff 0,rgba(255 255 255 / 80%) 40%,rgba(255 255 255 / 0%) 70%);
  --overlay-background: rgba(20 20 20 / 25%);
  --overlay-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23777' width='16' height='16' viewBox='0 0 122.878 122.88'%3E%3Cpath d='M1.426 8.313a4.87 4.87 0 0 1 0-6.886 4.87 4.87 0 0 1 6.886 0l53.127 53.127 53.127-53.127a4.87 4.87 0 0 1 6.887 0 4.87 4.87 0 0 1 0 6.886L68.324 61.439l53.128 53.128a4.87 4.87 0 0 1-6.887 6.886L61.438 68.326 8.312 121.453a4.87 4.87 0 0 1-6.886 0 4.87 4.87 0 0 1 0-6.886l53.127-53.128L1.426 8.313h0z'/%3E%3C/svg%3E") 16 16, crosshair;
  --icon-ms365-color: #ea3e23;
  --icon-yahoo-color: #5f01d1;
  --icon-filter: none;
}

/* Dark mode */

/* :host-context(html.atcb-dark):host(.atcb-bodyScheme),
:host-context(body.atcb-dark):host(.atcb-bodyScheme), */
:host(.atcb-dark) {
  --btn-background: #2e2e2e;
  --btn-background-hover: #373737;
  --btn-border: #4d4d4d;
  --btn-text: #dedede;
  --btn-text-hover: #f1f1f1;
  --btn-shadow: rgba(255 255 255 / 5%) -12px -5px 20px -8px, rgba(255 255 255 / 6%) -7px -5px 15px -3px, rgba(0 0 0 / 50%) 2px 5px 18px -1px, rgba(0 0 0 / 40%) 3px 3px 20px -3px;
  --btn-shadow-hover: rgba(255 255 255 / 6%) -12px -5px 23px -8px, rgba(255 255 255 / 7%) -7px -5px 18px -3px, rgba(0 0 0 / 60%) 2px 5px 19px -1px, rgba(0 0 0 / 50%) 3px 3px 22px -3px;
  --btn-shadow-active: rgba(255 255 255 / 7%) -12px -5px 23px -8px, rgba(255 255 255 / 8%) -7px -5px 18px -3px, rgba(0 0 0 / 70%) 2px 5px 19px -1px, rgba(0 0 0 / 60%) 3px 3px 22px -3px;
  --list-background: #2e2e2e;
  --list-background-hover: #373737;
  --list-text: #dedede;
  --list-text-hover: #f1f1f1;
  --list-close-background: #282828;
  --list-shadow: rgba(255 255 255 / 5%) -12px -5px 20px -8px, rgba(255 255 255 / 6%) -7px -5px 15px -3px, rgba(0 0 0 / 50%) 2px 5px 18px -1px, rgba(0 0 0 / 40%) 3px 3px 20px -3px;
  --list-shadow-modal: rgba(255 255 255 / 8%) -12px -5px 30px -8px, rgba(255 255 255 / 8%) -7px -5px 15px -3px, rgba(0 0 0 / 60%) 4px 6px 50px -4px, rgba(0 0 0 / 90%) 8px 12px 40px -2px;
  --modal-text: #f1f1f1;
  --modal-background: #242424;
  --modal-btn-bar: #38383a;
  --modal-btn-background: #181819;
  --modal-btn-secondary-background: #2e2d30;
  --modal-btn-background-hover: #434246;
  --modal-btn-text: #dbdbdb;
  --modal-btn-text-hover: #fff;
  --modal-btn-secondary-text: #b8b8b8;
  --modal-shadow: drop-shadow(5px 8px 30px rgba(0 0 0 / 90%));
  --modal-shadow-btn: rgba(255 255 255 / 5%) -2px -2px 10px,rgba(0 0 0 / 30%) 1px 2px 8px -1px;
  --date-btn-text: #ebebf0;
  --date-btn-text-secondary: #b5b5bd;
  --date-btn-cal-day-text: #101010;
  --date-btn-cal-month-text: #3e3e3f;
  --date-btn-cal-background: #c7c7cd;
  --date-btn-background: #363636;
  --date-btn-background-hover: #474747;
  --date-btn-shadow: rgba(255 255 255 / 10%) -8px -6px 20px, rgba(0 0 0 / 50%) 1px 3px 25px -8px,rgba(0 0 0 / 50%) 1px 1px 10px -3px;
  --checkmark-background: radial-gradient(circle,rgba(0 0 0 / 50%) 0,rgba(0 0 0 / 30%) 40%,rgba(0 0 0 / 0%) 70%);
  --overlay-background: rgba(20 20 20 / 60%);
  --icon-ms365-color: #ea3e23;
  --icon-yahoo-color: #bebebe;
  --icon-filter: grayscale(.2);
}

/* Size Breakpoints */

/* large */
.atcb-button-wrapper,
.atcb-list,
.atcb-modal-box {
  font-size: var(--base-font-size-l);
}

/* medium */
@media (max-width: 991px) {
  .atcb-button-wrapper,
  .atcb-list,
  .atcb-modal-box {
    font-size: var(--base-font-size-m);
  }
}

/* small */
@media (max-width: 575px) {
  .atcb-button-wrapper,
  .atcb-list,
  .atcb-modal-box {
    font-size: var(--base-font-size-s);
  }
}

/******************************
 * The triggering button
 */

.atcb-button-wrapper {
  display: block;
  padding: 0;
  position: relative;
}

.atcb-button {
  align-items: center;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0px;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-family: var(--font);
  font-size: 1em;
  font-weight: 600;
  justify-content: center;
  line-height: 1.5em;
  margin: .13em;
  max-width: 350px;
  min-width: 10em;
  padding: .65em 1em;
  position: relative;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  z-index: 1;
}

.atcb-button:disabled .atcb-text {
  letter-spacing: .1em;
}

.atcb-button.atcb-no-text,
.atcb-button:disabled {
  min-width: 0;
}

.atcb-rtl .atcb-button {
  direction: rtl;
  text-align: right;
}

.atcb-button:not([disabled]):focus,
.atcb-button:not([disabled]):hover {
  background-color: transparent;
  box-shadow: none;
}

.atcb-button:focus-visible {
  outline: 2px solid var(--keyboard-focus);
}

.atcb-button.atcb-active:not(.atcb-modal-style, .atcb-dropoverlay) {
  z-index: 15000000;
}

.atcb-button.atcb-active:not(.atcb-modal-style, .atcb-dropoverlay),
.atcb-button.atcb-single:not([disabled]):focus,
.atcb-button.atcb-single:not([disabled]):hover {
  background-color: transparent;
  box-shadow: none;
  margin: 0;
  padding: .78em 1.13em;
}

.atcb-button.atcb-active.atcb-dropoverlay {
  z-index: 14000090;
}

/******************************
 * Button Icon (also base for list icons) & Text
 */

.atcb-icon {
  height: 1em;
  margin-bottom: .3em;
  margin-right: .8em;
  flex-grow: 0;
  flex-shrink: 0;
}
.atcb-button .atcb-icon {
  color: #ffffff;
}

.atcb-rtl .atcb-icon {
  margin-right: 0;
  margin-left: .8em;
}

.atcb-no-text .atcb-icon {
  margin-right: 0;
  margin-left: 0;
}

.atcb-icon svg {
  height: 100%;
  fill: currentcolor;
  width: auto;
}

.atcb-text {
  overflow-wrap: anywhere;
  text-decoration: none !important;
  font-size: 18px;
  font-weight: 400;
}

/******************************
 * Options List
 */

.atcb-dropdown-anchor {
  bottom: 4px;
  height: 1px;
  width: 100%;
  opacity: 0;
  position: absolute;
}

.atcb-list-wrapper {
  box-sizing: border-box;
  padding: 0 4px;
  position: absolute;
  z-index: 14000090;
}

.atcb-list-wrapper.atcb-dropoverlay {
  z-index: 15000000;
  max-width: max-content;
}

.atcb-list {
  border-radius: 0 0 6px 6px;
  box-sizing: border-box;
  box-shadow: var(--list-shadow);
  color: var(--list-text);
  display: block;
  font-family: var(--font);
  min-width: 100%;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  width: fit-content;
}

.atcb-list-item {
  align-items: center;
  background-color: var(--list-background);
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  font-size: 1em;
  line-height: 1.75em;
  padding: .8em;
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.atcb-rtl .atcb-list-item {
  direction: rtl;
  text-align: right;
}

.atcb-list-item:hover {
  background-color: var(--list-background-hover);
  color: var(--list-text-hover);
}

.atcb-list-item:focus-visible {
  background-color: var(--list-background-hover);
  color: var(--keyboard-focus);
  font-weight: 600;
  outline: none;
}

.atcb-list-item:last-child {
  border-radius: 0 0 6px 6px;
}

.atcb-dropup .atcb-list-item:last-child {
  border-radius: 0;
  padding-bottom: 1.25em;
}

.atcb-dropup .atcb-list-item:first-child,
.atcb-dropoverlay .atcb-list .atcb-list-item:first-child,
.atcb-list.atcb-modal .atcb-list-item:first-child,
.atcb-dropup .atcb-list {
  border-radius: 6px 6px 0 0;
}

.atcb-dropoverlay .atcb-list .atcb-list-item:only-child,
.atcb-list.atcb-modal .atcb-list-item:only-child {
  border-radius: 6px;
}

.atcb-list.atcb-generated-button:not(.atcb-modal) .atcb-list-item:first-child {
  padding-top: 1.25em;
}

.atcb-dropup .atcb-list.atcb-generated-button:not(.atcb-modal) .atcb-list-item:first-child,
.atcb-dropoverlay .atcb-list.atcb-generated-button:not(.atcb-modal) .atcb-list-item:first-child {
  padding-top: .8em;
}

.atcb-dropoverlay .atcb-list,
.atcb-list.atcb-modal {
  border-radius: 6px;
}

.atcb-list.atcb-modal {
  box-shadow: var(--list-shadow-modal);
}

.atcb-list-item .atcb-icon {
  margin-bottom: .5em;
  margin-right: .6em;
  width: 1.125em;
}

.atcb-rtl .atcb-list-item .atcb-icon {
  margin-right: 0;
  margin-left: .6em;
}

.atcb-no-text .atcb-list-item .atcb-icon {
  margin: 0 auto;
}

.atcb-list-item-close {
  background-color: var(--list-close-background);
}

.atcb-list-item.atcb-list-item-close:not(:focus-visible) {
  color: var(--list-close-text);
}

.atcb-list-item-close svg {
  fill: currentcolor;
}

/******************************
 * Modal
 */

.atcb-modal {
  display: block;
  margin: auto;
  min-width: 250px;
  width: auto;
  position: relative;
  z-index: 14000090;
}

.atcb-modal-box {
  filter: var(--modal-shadow);
  color: var(--modal-text);
  cursor: default;
  box-sizing: border-box;  
  font-family: var(--font);
  line-height: 1.5em;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  width: 100%;
  margin-bottom: 20px;
  max-width: 32em;
  -webkit-tap-highlight-color: transparent;
}

.atcb-modal-box.atcb-rtl {
  text-align: right;
  direction: rtl;
  padding: 1.25em 1em 1.25em 2em;
}

/* icon */
.atcb-modal-icon {
  height: 2.5em;
  width: 2.5em;
  border-radius: 100%;
  background-color: var(--modal-background);
  padding: 1.75em;
  margin: auto;
}

.atcb-modal-icon svg {
  height: auto;
  fill: currentcolor;
  width: 100%;
}

/* content */
.atcb-modal-headline {
  background-color: var(--modal-background);
  border-radius: 6px 6px 0 0;
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.5em;
  padding: 1.8em 2em 1.3em;
  text-transform: uppercase;
  text-align: center;
}

.atcb-modal-icon + .atcb-modal-headline {
  margin-top: -2.6em;
  padding-top: 2.6em;
}

.atcb-modal-content {  
  background-color: var(--modal-background);
  font-size: 1em;
  padding: .3em 2.5em 2.25em;
}

@media (max-width: 575px) {
  .atcb-modal-headline {
    padding: 1.8em 1em 1em;
  }
  
  .atcb-modal-content {  
    padding: .3em 1em 2em;
  }
}

/* buttons */
.atcb-modal-buttons {
  background-color: var(--modal-btn-bar);
  border-radius: 0 0 6px 6px;
  box-sizing: border-box;
  padding: .8em 1em;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
  flex-flow: row-reverse wrap;
  align-items: center;
}

button.atcb-modal-btn,
a.atcb-modal-btn {
  background-color: var(--modal-btn-secondary-background);
  border: 0;
  border-radius: 6px;
  box-shadow: var(--modal-shadow-btn);
  color: var(--modal-btn-secondary-text);
  cursor: pointer;
  display: inline-block;
  font-family: var(--font);
  font-size: .9em;
  font-weight: 600;
  line-height: 1.5em;
  margin: .625em;
  padding: .625em 1.25em;
  position: relative;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-transform: uppercase;
}

button.atcb-modal-btn.atcb-modal-btn-primary,
a.atcb-modal-btn.atcb-modal-btn-primary {
  background-color: var(--modal-btn-background);
  color: var(--modal-btn-text);
}

button.atcb-modal-btn:hover,
a.atcb-modal-btn:hover {
  background-color: var(--modal-btn-background-hover);
  box-shadow: var(--modal-shadow-btn-hover);
  color: var(--modal-btn-text-hover);
  text-decoration: none;
}

button.atcb-modal-btn:focus-visible,
a.atcb-modal-btn:focus-visible{
  background-color: var(--modal-btn-background-hover);
  outline: 2px solid var(--keyboard-focus);
}

/******************************
 * Date Buttons
 */

.atcb-subevent-btn {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1em;
  box-shadow: var(--date-btn-shadow);
  background-color: var(--date-btn-background);
  border: 0;
  border-radius: 6px;
  padding: 0;
  margin: 0;
  touch-action: manipulation;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.atcb-subevent-btn:hover {
  align-items: center;
}

.atcb-subevent-btn:hover,
.atcb-subevent-btn:focus {
  background-color: var(--date-btn-background-hover);
  box-shadow: var(--date-btn-shadow-hover);  
}

.atcb-subevent-btn:focus-visible {
  outline: 2px solid var(--keyboard-focus);
}

.atcb-subevent-btn + .atcb-subevent-btn {
  margin-top: 30px;
}

.atcb-date-btn-left {
  border-radius: 4px 0 0 4px;
  align-self: stretch;
  background-color: var(--date-btn-cal-background);
  color: var(--date-btn-background-hover);
  padding: .7em .8em .8em;
  width: 2.7em;
  align-items: center;
  display: flex;
  flex-direction: column;
}

.atcb-rtl .atcb-date-btn-left {
  border-radius: 0 4px 4px 0;
}

.atcb-subevent-btn:hover .atcb-date-btn-left {
  opacity: .8;
}

.atcb-date-btn-day {
  color: var(--date-btn-cal-day-text);
  font-weight: 300;
  font-size: 2em;
  word-break: keep-all;
  padding-bottom: .1em;
}

.atcb-initialized[lang="zh"] .atcb-date-btn-day,
.atcb-initialized[lang="ja"] .atcb-date-btn-day,
.atcb-initialized[lang="ko"] .atcb-date-btn-day {
  font-size: 1.3em;
}

.atcb-date-btn-month {
  color: var(--date-btn-cal-month-text);
  font-weight: 600;
  font-size: 1em;
}

.atcb-date-btn-right {
  position: relative;
  color: var(--date-btn-text);
  min-width: 12.5em;
  overflow-wrap: anywhere;
}

.atcb-date-btn-details {
  opacity: 1;
  padding: .7em .8em;
  text-align: left;
}

.atcb-rtl .atcb-date-btn-details {
  text-align: right;
}

.atcb-date-btn-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1em;
}

.atcb-subevent-btn:hover .atcb-date-btn-details {
  opacity: 0;
}

.atcb-subevent-btn:hover .atcb-date-btn-hover {
  opacity: 1;
}

.atcb-date-btn-headline {
  font-weight: 600;
  font-size: .9em;
  margin-bottom: .5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.atcb-date-btn-content {
  display: flex;
  align-items: center;
  font-size: .8em;
  color: var(--date-btn-text-secondary);
}

.atcb-date-btn-content-location {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

.atcb-date-btn-content-icon {
  display: inline-block;
  margin-top: -.3em;
  height: 0.8em;
  width: 1.3em;
  flex: 0 0 1.3em;
}

.atcb-rtl .atcb-date-btn-content-icon {
  margin-right: 0;
  margin-left: .5em;
}

.atcb-initialized[lang="zh"] .atcb-date-btn-content-icon,
.atcb-initialized[lang="ja"] .atcb-date-btn-content-icon,
.atcb-initialized[lang="ko"] .atcb-date-btn-content-icon {
  margin-top: -.2em;
}

.atcb-date-btn-content-icon svg {
  height: 100%;
  fill: currentcolor;
  width: auto;
}

.atcb-date-btn-content + .atcb-date-btn-content {
  margin-top: .3em;
}

.atcb-date-btn-content-recurr-icon {
  padding-left: .3em;
}

/******************************
 * Checkmark Overlay
 */

.atcb-checkmark {
  display: none;
}

.atcb-saved .atcb-checkmark {
  box-sizing: content-box;
  color: var(--btn-text);
  display: block;
  position: absolute;
  top: -.9em;
  right: -.3em;
  padding: .5em;
  background: var(--checkmark-background);
  border-radius: 100%;
  height: 1.5em;
}

.atcb-button.atcb-active:not(.atcb-modal-style, .atcb-dropoverlay) .atcb-checkmark,
.atcb-button.atcb-single:focus .atcb-checkmark,
.atcb-button.atcb-single:hover .atcb-checkmark {
  top: -.77em;
  right: -.17em;
}

.atcb-checkmark svg {
  height: 100%;
  fill: currentcolor;
  width: auto;
}

/******************************
 * Background Overlay
 */

#atcb-bgoverlay {
  animation: atcb-bgoverlay-animate 0.2s ease 0s 1 normal forwards;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background-color: var(--overlay-background);
  border: 0;
  box-sizing: border-box;
  display: flex;
  
  /* could become simply 100dvh in the future - with regular padding then */
  height: calc(100vh + 100px);
  inset-inline: 0;
  left: 0;
  right: 0;
  top: 0;
  min-height: 100%;
  min-width: 100%;
  opacity: 0;
  overflow-y: auto;
  padding: 20px 20px 130px;
  position: fixed;
  width: 100vw;
  z-index: 14000000;
}

#atcb-bgoverlay.atcb-no-bg {
  animation: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
  background-color: transparent;
}

@keyframes atcb-bgoverlay-animate {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

#atcb-bgoverlay.atcb-click:hover {
  cursor: var(--overlay-cursor);
}

/******************************
 * Icon specifics
 */

.atcb-icon .atcb-icon-apple svg {
  fill: currentcolor;
}

.atcb-icon .atcb-icon-ical svg {
  fill: currentcolor;
}

.atcb-icon .atcb-icon-ms365 svg {
  fill: var(--icon-ms365-color);
}

.atcb-icon .atcb-icon-yahoo svg {
  fill: var(--icon-yahoo-color);
}

.atcb-icon .atcb-icon-google svg,
.atcb-icon .atcb-icon-msteams svg,
.atcb-icon .atcb-icon-outlookcom svg {
  filter: var(--icon-filter);
}
