/* Popup iframe START */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

@media (max-width: 767px) {
    .popup {
        width: 95%;
        height: 80%;
    }
}

.popup-content {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 10px;
    padding: 10px;
    background: #333;
    border: 1px solid #333;
    border-radius: 15px;
}

.popup-iframe {
    flex-grow: 1;
    width: 100%;
    height: calc(100% - 50px);
    border: none;
    border-radius: 15px;
}

.reload-iframe, .close-popup {
    position: absolute;
    top: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.reload-iframe {
    right: 80px;
}

.close-popup {
    right: 15px;
}

.reload-iframe img, .close-popup img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.popup-demo {
    position: relative;
    height: auto;
    max-width: 390px;
    display: block;
    margin: 0 auto;
    text-align: center;
}

.link-button, .play-button {
    z-index: 1002;
    font-family: 'Roboto', sans-serif;
    padding: 10px 15px;
    font-size: 22px;
    font-weight: 700;
    color: var(--dpp-modal-button-text-color);
    background: var(--dpp-modal-button-color);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    outline: none;
    animation: blink-animation 2s infinite;
    display: inline-block;
    margin: 5px;
    min-width: 200px;
    width: 100%;
    max-width: 300px;
}

.link-button {
    background: var(--dpp-link-button-color);
}

.play-button:hover {
    background: var(--dpp-modal-button-hover-color);
}

.link-button:hover {
    background: var(--dpp-link-button-hover-color);
}

.play-button:active, .link-button:active {
    box-shadow: inset 0 0 10px #000;
}

#game-overlay .ocb {
    z-index: 1002;
    font-family: 'Roboto', sans-serif;
    padding: 10px 15px;
    font-size: 22px;
    font-weight: 700;
    color: var(--dpp-modal-button-text-color);
    background: var(--dpp-modal-button-color);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    outline: none;
    margin: 10px 0;
    min-width: 200px;
    width: 100%;
    max-width: 300px;
}

#game-overlay .ocb:hover {
    background: var(--dpp-modal-button-hover-color);
}

#game-overlay .ocb:active {
    box-shadow: inset 0 0 10px #000;
}

@keyframes blink-animation {
    0%, 100% {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
}

#game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1001;
    border-radius: 15px;
}

.container-p {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.block-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}

.block-p {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    height: auto;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.block-p img {
    object-fit: contain !important;
    margin-bottom: 10px !important;
    align-self: center !important;
    border-radius: 10px !important;
    max-width: 150px !important;
}

.title-p {
    font-size: 27px;
    font-weight: bold;
    margin-bottom: 10px;
}

.bonus-p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

.play-button-p {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    margin-top: auto;
    font-size: 22px;
}

.play-button-p:hover {
    background-color: #c0392b;
}

@media (max-width: 480px) {
    .container-p {
        flex-wrap: wrap;
        gap: 10px;
    }

    .block-link {
        max-width: 100%;
    }

    .play-button-p {
        font-size: 18px;
    }
}

/* Block in popup styles END */

.wp-block-cover {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  margin-bottom: 20px;	
}

.wp-block-cover__image-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.wp-block-cover__background {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.4); /* затемнение */
  z-index: 2;
}

.wp-block-cover__inner-container {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 300px; /* или больше */
  text-align: center;
}

@media screen and (max-width: 768px) {
  .wp-block-cover__inner-container {
    padding: 1rem;
    min-height: 200px;
  }
}
