
/* Login navigation will be hidden only when hideLogin setting is enabled */
body.c2-link-iframe-hide-login ul#navbar-secondary {
  display: none;
}

.c2-link-iframe-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.c2-link-iframe-overlay.c2-link-iframe-show {
  opacity: 1;
  visibility: visible;
}

.c2-link-iframe-content {
  position: relative;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 95%;
  max-height: 95%;
  overflow: hidden;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  width: fit-content;
  height: fit-content;
}

.c2-link-iframe-overlay.c2-link-iframe-show .c2-link-iframe-content {
  transform: scale(1);
}

.c2-link-iframe-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.c2-link-iframe-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.c2-link-iframe-close:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

.c2-link-iframe-content iframe {
  display: block;
  border: none;
  width: 80%;
  height: 80%;
  min-width: 300px;
  min-height: 200px;
}

body.c2-link-iframe-no-scroll {
  overflow: hidden;
}

@media (max-width: 768px) {
  .c2-link-iframe-content {
    max-width: 98%;
    max-height: 98%;
    border-radius: 4px;
  }

  .c2-link-iframe-content iframe {
    width: 95%;
    height: 90%;
    min-width: 280px;
  }

  .c2-link-iframe-close {
    top: 5px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .c2-link-iframe-content iframe {
    width: 98%;
    height: 85%;
    min-width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c2-link-iframe-overlay,
  .c2-link-iframe-content,
  .c2-link-iframe-close {
    transition: none;
  }
}

@media (prefers-contrast: high) {
  .c2-link-iframe-close {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
  }

  .c2-link-iframe-content {
    border: 2px solid #000;
  }
}
