﻿.mp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
}

#mp-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.mp-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 26px;
    cursor: pointer;
    z-index: 10;
}

.mp-content {
    position: relative;
    background: #fff;
    max-width: 900px;
    margin: 5vh auto;
    padding: 30px;
    max-height: 90vh;
    overflow: auto;
    border-radius: 6px;
}

#mp-modal .modal-post-content .et_pb_post_title,
#mp-modal .modal-post-content .et_pb_fullwidth_header,
#mp-modal .modal-post-content .et_pb_title_featured_container,
#mp-modal .modal-post-content .et_pb_post_title_0,
#mp-modal .modal-post-content .et_pb_fullwidth_header_0 {
    display: none !important;
}

@media (max-width: 768px) {
  #mp-modal .mp-content {
    width: 95%;
    padding: 25px 20px;
  }
}

/* MODO VIDEO */
#mp-modal.is-video .mp-content {
    max-width: 1200px;
    margin: 2vh auto;
    padding: 20px;
}

/* Eliminar espacios arriba del video */
#mp-modal.is-video .mp-body > *:first-child {
    margin-top: 0 !important;
}

/* Forzar relación correcta */
#mp-modal.is-video iframe,
#mp-modal.is-video video {
    width: 100%;
    height: 70vh;
    max-height: 80vh;
}

/* Divi video */
#mp-modal.is-video .et_pb_video_box {
    margin-top: 0 !important;
}

/* Estilos para el mensaje de login */
.modal-login-required {
  text-align: center;
  padding: 40px 20px;
}

.modal-login-required .button {
  display: inline-block;
  padding: 10px 20px;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  margin: 10px;
  font-weight: bold;
}

.modal-login-required .button:hover {
  background: #005177;
}

#mp-modal .modal-post-content .wp-block-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    margin: 18px 0;
    border: 1px solid rgba(0, 81, 129, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
    box-shadow: 0 12px 30px rgba(0, 43, 71, 0.08);
}

#mp-modal .modal-post-content .wp-block-file__embed {
    display: none;
}

#mp-modal .modal-post-content .wp-block-file > a:first-of-type {
    flex: 1 1 auto;
    margin: 0;
    color: #005181;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
    word-break: break-word;
}

#mp-modal .modal-post-content .wp-block-file > a:first-of-type:hover {
    color: #0d6ea8;
    text-decoration: underline;
}

#mp-modal .modal-post-content .wp-block-file__button,
#mp-modal .modal-post-content .wp-block-file .wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 12px 18px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #005181 0%, #0b6b9d 100%);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(0, 81, 129, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#mp-modal .modal-post-content .wp-block-file__button:hover,
#mp-modal .modal-post-content .wp-block-file .wp-element-button:hover {
    background: linear-gradient(135deg, #0b6b9d 0%, #1488b8 100%);
    box-shadow: 0 14px 28px rgba(0, 81, 129, 0.28);
    transform: translateY(-1px);
}

#mp-modal .modal-post-content .wp-block-file__button::before,
#mp-modal .modal-post-content .wp-block-file .wp-element-button::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-top: 0;
    border-left: 0;
    transform: rotate(45deg) translateY(-1px);
    box-sizing: border-box;
}

@media (max-width: 640px) {
    #mp-modal .modal-post-content .wp-block-file {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    #mp-modal .modal-post-content .wp-block-file__button,
    #mp-modal .modal-post-content .wp-block-file .wp-element-button {
        width: 100%;
        min-width: 0;
    }
}
