/* Overlay */

.tei-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.65);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

/* Visible state */

.tei-overlay.tei-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Popup */

.tei-popup {
    position: relative;

    width: 100%;
    max-width: 600px;

    padding: 40px;

    background: #ffffff;
    color: #333333;

    border-radius: 8px;

    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.25);

    transform: translateY(20px);

    transition: transform 0.3s ease;
}

.tei-visible .tei-popup {
    transform: translateY(0);
}

/* Title */

.tei-popup h2 {
    margin: 0 0 20px;
    font-size: 28px;
    line-height: 1.3;
}

/* Content */

.tei-content {
    font-size: 16px;
    line-height: 1.6;
}

/* Close button */

.tei-close {
    position: absolute;
    top: 12px;
    right: 16px;

    padding: 0;

    border: none;
    background: transparent;

    color: #555555;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}

.tei-close:hover {
    color: #000000;
}

/* Action button */

.tei-button {
    display: inline-block;

    margin-top: 24px;
    padding: 12px 24px;

    background: #222222;
    color: #ffffff;

    text-decoration: none;
    border-radius: 4px;

    transition: background 0.2s ease;
}

.tei-button:hover {
    background: #444444;
    color: #ffffff;
}

/* Prevent scrolling */

body.tei-popup-open {
    overflow: hidden;
}

/* Mobile */

@media (max-width: 600px) {

    .tei-popup {
        padding: 30px 24px;
    }

    .tei-popup h2 {
        font-size: 23px;
    }

}
