/* Wrapper main */
#new-room-videos-wrapper {
  margin-top: 20px;
}

/* Layout styling */
.layout-wrapper {
  border: 1px solid #ddd;
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
  position: relative;
  transition: all 0.2s ease;
}

.layout-wrapper:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Layout header */
.layout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.layout-header h3 {
  margin: 0;
  color: #23282d;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: move;
  user-select: none;
  padding: 5px 0;
}

.layout-header h3:hover {
  color: #007cba;
}

.layout-header h3:before {
  content: "⋮⋮ ";
  color: #999;
  margin-right: 8px;
  font-size: 14px;
}

/* Title of Layout */
.wp-admin.layout-title {
  margin-bottom: 20px;
}

.wp-admin.layout-title input[type="text"] {
  width: 100%;
  max-width: 600px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Item styling */
.item-block {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  background: #fff;
  transition: all 0.2s ease;
}

.item-block:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Item header */
.header-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

.header-item h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: move;
  user-select: none;
}

.header-item h3:before {
  content: "↕ ";
  color: #aaa;
  margin-right: 5px;
  font-size: 13px;
}

/* Form in item */
.item-block .form-table {
  margin-top: 10px;
  width: 100%;
}

.item-block .form-table th {
  width: 100px;
  font-weight: 600;
  color: #23282d;
  text-align: left;
  vertical-align: top;
  padding: 8px 10px 8px 0;
}

.item-block .form-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.item-block input[type="text"] {
  width: 100%;
  max-width: 500px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

/* Image upload preview */
.item-image-preview {
  width: 100px;
  height: 100px;
  border: 2px dashed #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 5px;
}

.item-image-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

/* Buttons */
.add-item,
#add-layout {
  margin-top: 10px;
  background: #0073aa;
  border-color: #0073aa;
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-item:hover,
#add-layout:hover {
  background: #005a87;
  border-color: #005a87;
}

.remove-layout,
.remove-item,
.remove-item-image {
  font-size: 12px;
  background: none;
  border: 1px solid transparent;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
}

.remove-layout:hover,
.remove-item:hover,
.remove-item-image:hover {
  color: #dc3232 !important;
  border-color: #dc3232;
  background: rgba(220, 50, 50, 0.1);
}

/* Dragging effect */
.layout-wrapper.dragging,
.item-block.dragging {
  opacity: 0.85;
  transform: rotate(1deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Placeholder drag */
.layout-placeholder,
.item-placeholder {
  height: 70px;
  background: #f8f9fa;
  border: 2px dashed #007cba;
  margin: 10px 0;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #007cba;
  font-size: 13px;
  font-weight: 500;
}

/* Toggle layout & item in new room video */
.toggle-layout-news-room.dashicons,
.toggle-item-content.dashicons {
  border: none;
  background: none;
  margin-left: 20px;
  cursor: pointer;
  font-size: 20px;
}

/* fe*/
.wrapper {
  margin: 0;
  min-height: 100vh;
  height: auto;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.video-layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  max-width: 1200px;
  height: auto;
  align-items: center;
  margin: 64px 120px;
}

.nr-title {
  width: 100%;
  min-height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.line-span {
  width: 400px;
  height: 0;
  border: 1px solid #ccc;
  opacity: 1;
  transform: rotate(0deg);
}

.nr-title p {
  font-weight: 700;
  font-size: 25px;
  line-height: 140%;
  text-transform: uppercase;
  text-align: center;
}

.single-layout {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.video-container {
  position: relative;
  width: 100%;
  height: 616.36px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  display: block;
}

.video-container iframe.main-video {
  width: 100%;
  height: 100%;
  border: none;
}

.layout-title p {
  font-weight: 700;
  font-size: 20px;
  line-height: 150%;
  letter-spacing: 0.04rem;
  max-width: 1200px;
  opacity: 1;
  transform: rotate(0deg);
}

.item-list-container {
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible;
  width: 100%;
  gap: 16px;
  opacity: 1;
  transform: rotate(0deg);
}

.item-list {
  display: flex;
  transition: scroll-behavior 0.3s;
  overflow-x: auto;
  scrollbar-width: none;
}

.item-list::-webkit-scrollbar {
  display: none;
}

.item,
.item img {
  width: 300px;
  height: 180px;
  transform: rotate(0deg);
  opacity: 1;
  object-fit: cover;
}

.item-scroll {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  width: 1330px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 1;
  z-index: 10;
  pointer-events: none;
}

.scroll-block-left,
.scroll-block-right {
  width: 65px;
  height: 65px;
  border-radius: 100px;
  transform: rotate(0deg);
  opacity: 1;
  align-content: center;
  pointer-events: none;
}

.scroll-left,
.scroll-right {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.scroll-left::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border-left: 2px solid #242424;
  border-bottom: 2px solid #242424;
  transform: rotate(45deg);
}

.scroll-right::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 2px;
  border-right: 2px solid #242424;
  border-top: 2px solid #242424;
  transform: rotate(45deg);
}

.item-list .item {
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 4px 0px 12px 0px #00000014;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.item-list .item.active {
  border: 1.5px solid #ff0000;
  box-shadow: 0px 4px 8px 0px #00000029, 4px 0px 12px 0px #00000014;
  z-index: 10;
}

.scroll-block-left button,
.scroll-block-right button {
  pointer-events: auto;
}

.item-list .item.inactive::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffffb8;
  pointer-events: none;
  z-index: 5;
}

.remove-item-image.hidden {
  display: none !important;
}

@media (max-width: 767px) {
  .video-layout-wrapper {
    margin: 48px 16px;
    max-width: 343px;
    gap: 24px;
  }

  .line-span {
    width: 160px;
  }

  .nr-title {
    min-height: 27px;
  }

  .nr-title p {
    font-size: 19px;
    min-height: 27px;
  }

  .layout-title p {
    text-align: center;
    font-size: 14px;
    min-height: 21px;
  }

  .video-container {
    position: relative;
    width: 100%;
    height: 176.18px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .video-container iframe.main-video {
    width: 100%;
    height: 100%;
    border: none;
  }

  .item,
  .item img {
    width: 85.75px;
    height: 51.45px;
  }

  .wrapper {
    min-height: auto;
    height: auto;
  }

  .single-layout {
    gap: 24px;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .video-layout-wrapper {
    margin: 56px 64px;
    max-width: 896px;
    gap: 32px;
  }

  .line-span {
    width: 240px;
  }

  .layout-title p {
    text-align: center;
    font-size: 20px;
    min-height: 21px;
  }

  .video-container {
    position: relative;
    width: 100%;
    height: 460.22px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .video-container iframe.main-video {
    width: 100%;
    height: 100%;
    border: none;
  }

  .item,
  .item img {
    width: 224px;
    height: 140px;
  }

  .item-scroll {
    width: 1024px;
  }

  .wrapper {
    min-height: auto;
    height: auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .video-layout-wrapper {
    margin: 56px 64px;
    max-width: 640px;
    gap: 32px;
  }

  .line-span {
    width: 240px;
  }

  .layout-title p {
    text-align: center;
    font-size: 20px;
    min-height: 21px;
  }

  .video-container {
    position: relative;
    width: 100%;
    height: 328.73px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .main-video {
    width: 100%;
    flex: 1;
  }

  .video-container iframe.main-video {
    width: 100%;
    height: 100%;
    border: none;
  }

  .item,
  .item img {
    width: 160px;
    height: 100px;
  }

  .wrapper {
    min-height: auto;
    height: auto;
  }
}