.epft-invalid{border-color:#dc3545!important;box-shadow:0 0 0 .2rem rgba(220,53,69,.15)!important}.elementor-popup-modal .contest-multilang-form .elementor-message{padding:10px 12px;margin-top:10px;border-radius:6px;font-size:14px}.elementor-popup-modal .contest-multilang-form .elementor-message-success{color:#0f5132;background:#d1e7dd}.elementor-popup-modal .contest-multilang-form .elementor-message-danger{color:#842029;background:#f8d7da}


/* Form legal links */
.contest-multilang-form .epft-terms-link,
.contest-multilang-form .epft-privacy-link {
    color: #1267d6 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    cursor: pointer;
}
.contest-multilang-form .epft-link-disabled {
    cursor: default;
}

/* Contest Terms modal */
.epft-legal-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    padding: 20px;
    background: rgba(0,0,0,.68);
    align-items: center;
    justify-content: center;
}
.epft-legal-modal.is-open {
    display: flex;
}
.epft-legal-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(82vh, 760px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 30px;
    border-radius: 14px;
    background: #fff;
    color: #222;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.epft-legal-title {
    margin: 0 45px 18px 0;
    font-size: 24px;
    line-height: 1.3;
}
.epft-legal-body {
    font-size: 15px;
    line-height: 1.7;
}
.epft-legal-body p:last-child {
    margin-bottom: 0;
}
.epft-legal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 32px;
    line-height: 38px;
    cursor: pointer;
}
body.epft-legal-open {
    overflow: hidden !important;
}

@media (max-width: 600px) {
    .epft-legal-modal {
        padding: 12px;
    }
    .epft-legal-dialog {
        width: 100%;
        max-height: 88dvh;
        padding: 22px 18px;
        border-radius: 12px;
    }
    .epft-legal-title {
        font-size: 20px;
    }
}

.epft-legal-frame {
    display: block;
    width: 100%;
    min-height: 65vh;
    border: 0;
    background: #fff;
}
@media (max-width: 600px) {
    .epft-legal-frame {
        min-height: 72dvh;
    }
}


/* Enhanced legal modal - client requested both legal documents in popup */
.epft-legal-modal {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.epft-legal-dialog {
    display: flex;
    flex-direction: column;
    width: min(820px, calc(100vw - 32px));
    max-height: min(86vh, 820px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px !important;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(0,0,0,.38) !important;
}

.epft-legal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid #e9edf3;
    background: #ffffff;
}

.epft-legal-title {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 800;
    line-height: 1.3;
    color: #172033;
}

.epft-legal-close {
    position: static !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px !important;
    height: 42px !important;
    border: 1px solid #dfe4ec !important;
    border-radius: 50%;
    background: #f7f9fc !important;
    color: #1f2937 !important;
    font-size: 28px !important;
    line-height: 1 !important;
    transition: background .2s ease, transform .2s ease;
}

.epft-legal-close:hover {
    background: #eef2f7 !important;
    transform: rotate(4deg);
}

.epft-legal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 22px 24px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    font-size: 15px !important;
    line-height: 1.75 !important;
    color: #344054;
}

.epft-legal-body .epft-legal-frame {
    width: 100% !important;
    min-height: 62vh !important;
    height: 62vh !important;
    border: 0 !important;
    border-radius: 10px;
    background: #fff;
}

.epft-legal-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    justify-content: flex-end;
    padding: 14px 22px;
    border-top: 1px solid #e9edf3;
    background: #ffffff;
}

.epft-back-to-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: #1267d6;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(18,103,214,.22);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.epft-back-to-form:hover {
    background: #0f59ba;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(18,103,214,.28);
}

.epft-back-to-form:focus,
.epft-legal-close:focus {
    outline: 3px solid rgba(18,103,214,.22);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .epft-legal-modal {
        padding: 8px !important;
        align-items: flex-end !important;
    }

    .epft-legal-dialog {
        width: 100% !important;
        max-height: 92dvh !important;
        border-radius: 16px 16px 0 0 !important;
    }

    .epft-legal-header {
        padding: 14px 16px;
    }

    .epft-legal-title {
        font-size: 18px !important;
    }

    .epft-legal-body {
        padding: 16px !important;
        font-size: 14px !important;
    }

    .epft-legal-body .epft-legal-frame {
        min-height: 68dvh !important;
        height: 68dvh !important;
    }

    .epft-legal-footer {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }

    .epft-back-to-form {
        width: 100%;
        min-height: 48px;
        font-size: 15px;
    }
}


/* Legal popup content separation */
.epft-legal-body {
    white-space: normal;
    word-break: break-word;
}

.epft-legal-body h1,
.epft-legal-body h2,
.epft-legal-body h3,
.epft-legal-body h4 {
    color: #172033;
    margin-top: 1.2em;
    margin-bottom: .55em;
}

.epft-legal-body a {
    color: #1267d6;
    font-weight: 600;
}


/* Keep legal modal inside the Elementor form popup so closing legal content
   never counts as a click outside the Elementor popup. */
.elementor-popup-modal .dialog-widget-content {
    position: relative !important;
}

.elementor-popup-modal #epft-legal-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
}

/* Legal popup closes ONLY via X or Back to Form. */
.elementor-popup-modal #epft-legal-modal {
    cursor: default;
}
