.atg-container {
  display: flex;
  max-width: 100%;
  margin: auto;
}

.atg-sidebar {
  flex: 1;
  margin-right: 20px;
}

.atg-main {
  flex: 3;
  display: flex;
  flex-direction: column;
  position: relative;
}

.atg-gallery {
  overflow-y: auto;
  margin-bottom: 20px;
}

.atg-pagination {
  align-self: center;
}

@media (max-width: 768px) {
  .atg-sidebar {
    display: none;
  }

  .atg-gallery {
    overflow-y: auto;
    max-height: calc(100vh - 50px);
    /* Adjust the 50px to account for the pagination height */
  }
}

.assignment-template-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.atg-pagination-controls {
  display: flex;
  justify-content: center;
  padding: 10px;
}

.atg-pagination-btn {
  margin: 0 5px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 50%;
  width: 30px;
  height: 30px;
}

.atg-sidebar ul li.active {
  background-color: #083D77;
  color: #ffffff;
  font-weight: bold;
}

.atg-list-item {
  width: 230px;
  border-radius: 8px;
  height: 35px;
  padding: 5px 10px;
  cursor: pointer;
}

.atg-item-left {
  display: flex;
  align-items: center;
}

input[type=search].atg-search {
  height: 50px;
  margin-bottom: 25px;
  border-color: #e3e3e3;
}

.atg-sidebar ul {
  list-style: none;
  margin: 0;
}

.atg-sidebar ul li {
  margin-bottom: 10px;
  padding: 5px 10px;
  height: 35px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  background: white;
}

.atg-sidebar ul li span.template-count {
  height: 20px;
  min-width: 20px;
  display: flex;
  font-size: 12px;
  font-weight: bold;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: #c6e2fd;
  border-radius: 4px;
}

.tag-color {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  display: flex;
  margin-right: 10px;
}

.all-assignments-button {
  margin-bottom: 15px;
}

h3.tag-category {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}


.assignment-template-item {
  border: 1px solid #efefef;
  padding: 15px;
  box-sizing: border-box;
  min-width: 285px;
  flex: 1;
  max-width: calc(33.333% - 10px);
  border-radius: 8px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.assignment-template-item:hover {
  box-shadow: 0px 2px 4px 1px #0000001c;
}

.assignment-template-item>div {
  flex-grow: 1;
  /* This will push the button to the bottom */
}

.template-link-button {
  display: block;
  text-align: center;
  background-color: #083D77;
  color: white;
  padding: 10px;
  border-radius: 25px;
  text-decoration: none !important;
  margin-top: 10px;
  align-self: flex-end;
  width: 100%;
}

.template-link-button:hover {
  color: white;
  background-color: #1e64ae;
}

.image-container {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

.image-placeholder {
  width: 100%;
  height: 150px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

.image-placeholder.error {
  background: #f8d7da;
  animation: none;
}

.atg-featured-image {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  border-radius: 4px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Media query for two items per row */
@media (max-width: 900px) {
  .assignment-template-item {
    max-width: calc(50% - 10px);
  }
}

/* Media query for one item per row */
@media (max-width: 600px) {
  .assignment-template-item {
    max-width: calc(100% - 10px);
  }
}

.assignment-template-gallery-loader {
  background: #00000066;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 8px;
  height: 60vh;
}

.template-tags-listed {
  margin: .5em 0;
  opacity: .8;
  margin-bottom: .5em !important; /* needed for override */
}

.template-cta-modal {
  display: none;
  position: fixed !important; /* needed for override */
  z-index: 1;
  left: 0;
  top: 0;
  width: 100% !important; /* needed for override */
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.atg-cta-button {
  width: auto;
  border-radius: 4px;
  font-size: 1.2em;
  margin: 0;
  align-self: baseline;
  padding: 1em 2em;
}

.template-cta-modal-content {
  background-color: #fff;
  margin: auto;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 8px;
  max-width: 1024px;
  height: auto;
  max-height: 850px;
  width: 100%;
  overflow: auto;
}

.template-cta-modal-footer-button-wrapper {
  display: flex;
  align-items: center;
  justify-content: end;
  width: 100%;
}

.template-cta-form-right-side {
  flex: 1;
  padding-left: 3em;
  text-align: center;
}

p.template-cta-modal-form-field-hint {
  margin-top: .5em;
  margin-bottom: -0.25em;
}

.template-cta-iframe iframe {
  aspect-ratio: 16 / 9;
  width: 100% !important;
  border-radius: 10px;
  max-height: 320px;
}

.template-cta-modal-form-wrapper {
  display: flex;
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
  /* Allow items to wrap onto the next line */
}

/* Media query to stack the video below the form on smaller screens */
@media (max-width: 768px) {
  .template-cta-form-right-side {
    padding-left: 0;
    padding-top: 20px;
    /* Add some spacing between the form and video */
  }

  .template-cta-modal-form-wrapper {
    flex-direction: column;
    /* Stack the form and video vertically */
    align-items: center;
    /* Center the video horizontally */
  }

  .template-cta-iframe iframe {
    max-width: 100%;
    /* Ensure the video doesn't overflow the container */
  }
}


p.template-cta-modal-skip-link-p {
  margin-bottom: 0;
}

.template-cta-modal-content-inner,
.template-cta-modal-content-inner__loader{
  display: flex;
  flex-direction: column;
}

.template-cta-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.template-cta-modal-close:hover,
.template-cta-modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.template-cta-modal-form-group {
  margin-bottom: 1em;
  display: flex;
  flex-direction: column;
  max-width: 600px;
}

.template-cta-modal-content-inner, .template-cta-modal-content-inner__loader {
  max-width: 950px;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.template-cta-modal-form-group label {
  color: #4B4F58;
  margin-bottom: .25em;
  font-family: "Lato", Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 300;
}

.template-cta-modal-form-group input {
  color: black;
  font-family: "Lato", Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 300;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.template-cta-modal-description-wrapper {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.template-cta-modal-description, p.template-cta-modal-description {
  font-family: "Lato", Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 300;
  color: #4B4F58;
  margin-bottom: 0px;
}

.template-cta-modal-title, h3.template-cta-modal-title {
  font-family: "Lato", Verdana, Geneva, Tahoma, sans-serif !important;
  font-weight: 300;
  color: black;
  font-weight: normal;
  font-size: 2em;
  letter-spacing: -.05em;
}

.template-cta-modal-skip-link {
  color: #5FAFE4;
  text-decoration: underline;
  cursor: pointer;
}

.template-cta-modal-button {
  min-width: 135px;
  width: auto;
  border-radius: 2em;
  align-self: end;
  margin-left: auto;
}

.template-cta-modal-button:disabled {
  background-color: white;
  color: #6a2967;
  cursor: not-allowed;
  border: 1px solid #6a2967;/
}

.template-cta-validation-message {
  background: #f16969;
  color: white;
  padding: .5em 1em;
  max-width: 600px; 
  min-width: 300px;
  margin-right: 20px;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  height: 40px; 
  font-weight: bold;
  display: none;
}

.template-cta-modal-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1em;
}

.atg-settings-form input {
  width: 400px;
}
