html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.preview-return { position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:30; background:#fff; color:#173f3b; padding:10px 18px; border:0; border-radius:24px; font:14px Arial,sans-serif; text-decoration:none; box-shadow:0 2px 15px #0003; text-align:center; cursor:pointer; }
.demo-return { width: max-content; max-width: calc(100% - 28px); box-sizing: border-box; line-height: 1.5; }
.demo-return span { display: block; font-weight: bold; }
.demo-return:focus-visible { outline: 3px solid #427c70; outline-offset: 3px; }

#viewport {
  position: fixed;
  inset: 0;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;

  display: flex;
  justify-content: center;
  align-items: center;

  background: var(--calendar-page-background) center / cover no-repeat;
  font-family: Arial, sans-serif;
}


#calendar-wrapper {
  position: relative;
  width: 100dvw;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;

}


#calendar {
  position: relative;

  width: var(--calendar-width);
  height: var(--calendar-height);
  perspective: 3000px;
  transform-origin: center left;

}

#background {
  position: absolute;
  height: 100%;
  z-index: 1;
  box-shadow: 10px 10px 50px black;
    border: 2px solid white;
}


.door {
  position: absolute;

  border: 1px dashed rgba(0,0,0,0.5) ;
  cursor: pointer;
  transform-origin: right center;
  transform: rotateY(0deg);
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
  background-image: var(--calendar-image);
  background-size: var(--calendar-width) var(--calendar-height);
  z-index: 3;

}

.door::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #999, #eee);
  border-top: 1px solid rgba(255,255,255,0.3);
  border-right: 2px solid rgba(255,255,255,0.3);
  border-left: 2px solid rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(0,0,0,0.3);
  backface-visibility: hidden;
  transform: rotateY(180deg);

}

.hidden-image {
  position: absolute;
  transform-origin: right center;
  transform: rotateY(0deg);
  background-size: cover;
  background-position:center;

  z-index: 2;
  box-shadow:
    -2px -2px 2px rgba(0, 0, 0, 0.2),
    2px 2px 2px rgba(255, 255, 255, 0.2),
  inset 0 0 15px rgba(0, 0, 0, 0.8);
}
.num {
	background:#FFFFFF; border-radius:50%; padding:3px;
	width:20px; height:20px; text-align:center; vertical-align:middle; display:table-cell; top: 10px; left:10px; position:relative;
}



.door.open {
  transform: rotateY(100deg);
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) { .door { transition: none; } }


    .calendar-controls {
      position: fixed;
      bottom: 20px;
      left: 20px;
      z-index: 20;
      display: flex;
      flex-direction: column-reverse;
      align-items: flex-start;
      gap: 12px;
    }

    .volume-control-container {
      display: flex;
      align-items: center;
      justify-content: left;
      width: 50px;
      height: 50px;
      background-color: rgba(0,0,0,0.5);
      border-radius: 30px;
      overflow: hidden;
      transition: width 0.3s ease, height 0.3s ease;
      cursor: pointer;
    }

    .volume-control-container:hover, .volume-control-container:focus-within {
      width: 180px;
      height: 50px;
      border-radius: 30px;
    }

    .volume-control-container img {
      width: 30px;
      height: 30px;
      margin: 0 10px;
    }

    .volume-slider {
      display: none;
      width: 100px;
      height: 5px;
      margin-right: 10px;
      appearance: none;
      background: #ddd;
      border-radius: 5px;
    }

    .volume-control-container:hover .volume-slider, .volume-control-container:focus-within .volume-slider {
      display: block;
    }

    .volume-slider::-webkit-slider-thumb {
      appearance: none;
      width: 15px;
      height: 15px;
      background: #FFF;
      border-radius: 50%;
      cursor: pointer;
      border:2px solid #000;
    }

    .volume-slider::-moz-range-thumb {
      width: 15px;
      height: 15px;
      background: #333;
      border-radius: 50%;
      cursor: pointer;
    }
    #speaker-icon {
		background: url(/calendrier/assets/sound-high-volume.svg);
		background-size:contain;
		background-position:left; background-repeat:no-repeat;
		display:inline-block;
		 width: 30px;
      height: 30px;
      margin: 0 10px;
      position:relative; z-index:2;
	}
	.volume-control-container:has(.volume-slider[value="0"]) #speaker-icon {
		background-image: url(/calendrier/assets/sound-mute.svg);
	}

.service-info-control { position: relative; }
.calendar-round-button { display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; font: italic 700 28px/1 Georgia, serif; -webkit-tap-highlight-color: transparent; }
.calendar-round-button:hover, .calendar-round-button[aria-expanded="true"] { background: rgba(0,0,0,.7); }
.calendar-round-button:focus-visible, .volume-control-container:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.service-info-bubble { position: absolute; left: 0; bottom: 62px; box-sizing: border-box; width: min(320px, calc(100dvw - 40px)); max-height: calc(100dvh - 164px); overflow-y: auto; padding: 23px 22px; border-radius: 14px; background: #fff; color: #173f3b; box-shadow: 0 7px 30px #0004; font: 14px/1.6 Arial, sans-serif; }
.service-info-bubble[hidden] { display: none; }
.service-info-bubble h2 { margin: 0 20px 12px 0; font-size: 18px; line-height: 1.35; }
.service-info-bubble p { margin: 0 0 13px; }
.service-info-bubble a { color: #1d5851; text-underline-offset: 3px; }
#service-info-close { position: absolute; top: 6px; right: 9px; width: 30px; height: 30px; border: 0; background: none; color: #526b62; cursor: pointer; font: 24px/1 Arial, sans-serif; }
.service-info-bubble .service-create-link { display: inline-block; padding: 9px 14px; border-radius: 7px; background: #1d5851; color: #fff; text-decoration: none; font-weight: 700; }
@media (max-width: 780px), (hover: none) and (pointer: coarse) {
  .calendar-controls { flex-direction: row; }
  .service-info-bubble { position: fixed; left: 20px; bottom: 82px; max-height: calc(100dvh - 106px); }
}
@media (prefers-reduced-motion: reduce) { .volume-control-container { transition: none; } }

	   .flake {
            position: absolute;
            top: -50px;
            width: 10px;
            height: 10px;
            background: white;
            border-radius: 50%;
            opacity: 0.8;
            pointer-events: none;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        }


