@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

*, html, body {
	padding: 0;
	margin: 0;
    font-family: 'Open Sans', sans-serif;
}

body {
	background: transparent;
}

.btn-outline-primary {
	color: #ffffff !important;
	border-color: #ffffff;
}

.btn-outline-primary:hover {
	background: #ffffff;
	border-color: #ffffff;
	color: #006400 !important;
}

/* Advent Calendar Container */
.advent-calendar {
  position: relative;
  width: 100%; /* Calendar spans 100% of the container width */
  aspect-ratio: 3 / 4; /* Maintain a 3:4 ratio */
  background-size: cover !important; /* Cover the entire container */
  background-position: center; /* Centre the image */
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 evenly spaced columns */
  grid-template-rows: repeat(6, 1fr); /* 6 evenly spaced rows */
  gap: 3%; /* Percentage-based gap between doors */
  padding: 3%; /* Percentage-based padding around the edges */
  border: 2px solid #ccc; /* Styled border */
  border-radius: 10px; /* Rounded edges */
  box-sizing: border-box; /* Ensure padding and borders are part of the total width */
  overflow: hidden;
}

.advent-calendar.halloween {
  grid-template-columns: repeat(5, 1fr); /* 5 evenly spaced columns */
}

/* Individual Doors */
.advent-door {
  position: relative;
  background: transparent; /* Fully transparent to show the calendar image behind */
  border: 2px solid rgba(0, 0, 0, 0.2); /* Subtle border for the door */
  border-left: 2px dotted rgba(0, 0, 0, 0.2); /* Perforated edge for folding */
  cursor: pointer;
  z-index: 2; /* Doors should remain above the content initially */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.advent-door::after {
    content: "";
    position: absolute;
    width: calc(100% + 10px);
    height: 100%;
    box-shadow: 
        inset 0px -2px 5px rgba(255, 255, 255, 0.1),
        inset 5px 0px 5px rgba(255, 255, 255, 0.1),
        inset 0px 2px 5px rgba(255, 255, 255, 0.1);
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%);
    pointer-events: none;
    left: -10px;
}

.advent-door:hover {
  transform: scale(1.05); /* Subtle zoom on hover */
}

.advent-door.open {
  background: #fff; /* White background for opened door */
  border: 2px solid #fff; /* Solid white border */
  transform: none; /* Disable hover effects */
  cursor: default; /* Disable pointer cursor */
  text-align: center;
  padding: 3px; /* Add padding for content */
  overflow: hidden;
}

.advent-door.open::before {
	display: none;
}

/* Numbers on Doors */
.advent-door::before {
  content: attr(data-number); /* Display the number on the door */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.8); /* Door number colour */
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7); /* Add a shadow for better visibility */
  z-index: 3;
}

.advent-door.open::before {
  content: ''; /* Remove the number when the door is opened */
}

/* Loading Spinner */
.advent-door.loading {
	background: rgba(255,255,255,0.2) url("/theme/images/loading.gif") 50% 50% no-repeat;
	background-size: 40%;
	width: 100%;
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reset Button */
.reset-button {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  background-color: #d9534f; /* Red button */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  opacity: 0;
}

.reset-button:hover {
  background-color: #c9302c;
  opacity: 1;
}

.scalable-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal; /* Allow wrapping */
    word-break: break-word; /* Break long words */
    overflow: hidden; /* Prevent overflow */
    height: 100%; /* Match parent height */
    width: 100%; /* Match parent width */
}

.call-to-action {
	margin-top: 10px;
	text-align: center;
}
.call-to-action a {
	text-decoration: none;
	color: #333333;
	text-shadow: 1px 1px 2px rgba(255, 255, 255, 1);
	font-weight: bold;
}
.call-to-action a:hover {
	text-decoration: underline;
}

#advent-overlay {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    background: #8b0000;
    z-index: 2000; /* Above Bootstrap modals etc. */
    display: none;
    overflow-y: auto;
}
#advent-overlay.show {
    display: block;
}
#advent-overlay .advent-overlay-inner {
    min-height: 100%;
    padding: 1.5rem 1rem 2rem;
    color: #fff;
}
#advent-overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2010;
}
#advent-day-title {
    color: #fff;
    font-weight: 600;
    font-size: 4rem;
}
.advent-image-wrapper {
    width: 100%;
}
#advent-day-text-box {
    background: #f00;
    color: #fff;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    max-height: 600px;
    box-sizing: border-box;
    margin: 0 auto 1rem auto; /* centre it */
}
#advent-day-text {
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
    width: 100%;
}
#advent-day-image {
    width: 100%;
    max-width: 600px;
    height: auto;
}

#advent-day-link-row {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 auto;
}

#advent-day-link-row .qr-wrap {
	background: #ffffff;
	padding: 20px;	
}

#advent-video-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.advent-qr-image {
    max-width: 100%;
    height: auto;
}
@media (min-width: 768px) {
    #advent-overlay .advent-overlay-inner {
        padding: 3rem 5rem 3rem;
    }

    #advent-day-button {
        max-width: 320px;
    }
}