.tsp-course-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tsp-course-modal.is-open {
    display: block;
    animation: tspFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tsp-course-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 10, 24, 0.75);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tsp-course-modal-container {
    background: #fff; /* fallback */
    background: var(--light-blue);
    width: 100%;
    max-width: 650px;
    height: 85vh;
    max-height: 750px;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 24px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tsp-course-modal.is-open .tsp-course-modal-container {
    transform: scale(1) translateY(0);
}

.tsp-course-modal-header {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.tsp-course-modal-title-text {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.tsp-course-modal-close {
    border: 0;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: transparent;
}

.tsp-course-modal-close:hover {
    color: #0f172a;
    transform: rotate(90deg);
}

.tsp-course-modal-iframe-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

#tsp-modal-iframe {
    border: none;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#tsp-modal-iframe.loaded {
    opacity: 1;
}

body.tsp-course-modal-prevent-scroll {
    overflow: hidden;
    height: 100vh;
}

.tsp-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
    background-color: #e2e8f0 !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

@keyframes tspFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .tsp-course-modal-overlay {
        padding: 0;
    }

    .tsp-course-modal-container {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .tsp-course-modal-header {
        padding-top: 50px;
    }
}
