/* IIT Companion - Video bubble + popup player */

.iitc-vid-root {
    position: fixed;
    bottom: var(--iitc-vid-bottom, 84px);
    display: none;
    align-items: flex-end;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.iitc-vid-root.iitc-vid-visible {
    display: flex;
}

.iitc-vid-btn-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iitc-vid-btn {
    position: relative;
    width: var(--iitc-vid-size, 50px);
    height: var(--iitc-vid-size, 50px);
    min-width: 0;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    /* background-color only, so a thumbnail set inline keeps showing */
    background-color: #002d74 !important;
    background-size: cover !important;
    background-position: center !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    padding: 0 !important;
    line-height: 1;
    transition: transform 0.15s ease;
}

.iitc-vid-btn:hover {
    transform: scale(1.08);
}

/* Pulse ring */
.iitc-vid-btn::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 176, 0, 0.9);
    animation: iitc-vid-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes iitc-vid-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    70% { transform: scale(1.55); opacity: 0; }
    100% { transform: scale(1.55); opacity: 0; }
}

.iitc-vid-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 4px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.iitc-vid-label {
    background: #ffffff;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
}

.iitc-vid-label-hover {
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.iitc-vid-btn-wrap:hover .iitc-vid-label-hover {
    opacity: 1;
    transform: translateX(0);
}

.iitc-vid-label-off {
    display: none;
}

/* Modal */

.iitc-vid-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.iitc-vid-modal[hidden] {
    display: none;
}

.iitc-vid-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 10, 30, 0.82);
    animation: iitc-vid-fade 0.2s ease;
}

@keyframes iitc-vid-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.iitc-vid-modal-frame {
    position: relative;
    width: min(900px, 94vw);
    animation: iitc-vid-rise 0.25s ease;
}

@keyframes iitc-vid-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.iitc-vid-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.iitc-vid-player iframe,
.iitc-vid-player video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.iitc-vid-modal-close {
    position: absolute;
    top: -40px;
    right: -6px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    opacity: 0.85;
}

.iitc-vid-modal-close:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    .iitc-vid-modal {
        padding: 12px;
    }
    .iitc-vid-modal-close {
        top: -38px;
        right: 0;
    }
}
