/* ============================================================
   ChromecastPlugin – styles for the cast button & status bar
   ============================================================ */

/* ---- Cast button wrapper injected into the Video.js control bar ---- */
.chromecast-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* Match Video.js control button sizing */
    width: 3em;
    height: 3em;
    position: relative;
}

/* The built-in <google-cast-launcher> Web Component */
google-cast-launcher {
    --connected-color:    #4285f4;   /* Google blue when casting */
    --disconnected-color: #ffffff;   /* White when idle */
    width:  24px;
    height: 24px;
    display: block;
    cursor: pointer;
}

/* Hover feedback */
.chromecast-wrapper:hover google-cast-launcher {
    --disconnected-color: #cccccc;
}

/* ---- Status bar shown below the player while casting ---- */
.chromecast-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a73e8;
    color: #ffffff;
    padding: 6px 14px;
    font-size: 0.875rem;
    border-radius: 0 0 4px 4px;
    margin-top: -2px;          /* Snug under the player */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.chromecast-status #chromecast-status-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#chromecast-stop-btn {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 3px;
    padding: 2px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 12px;
    white-space: nowrap;
    transition: background 0.15s;
}

#chromecast-stop-btn:hover {
    background: rgba(255,255,255,0.35);
}

/* ---- Responsive: hide button on tiny screens where casting is less common ---- */
@media (max-width: 480px) {
    .chromecast-wrapper {
        width: 2.5em;
    }

    google-cast-launcher {
        width:  20px;
        height: 20px;
    }
}
