/**
 * StreamSynapseWebSDK Styles
 * All classes are prefixed with 'ss-' to avoid conflicts
 */

/* Base container styles */
.ss-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Video container */
.ss-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Video.js player container */
.video-js {
    position: relative;
    z-index: 1;
}

/* Overlay styles */
.ss-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0, 0, 0);
    z-index: 999999;
    pointer-events: all;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ss-overlay.ss-active {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* Chain player styles */
.ss-chain-player {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 999999;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ss-overlay.ss-active .ss-chain-player {
    opacity: 1;
    transform: scale(1);
}

/* Controls container */
.ss-controls {
    position: absolute;
    bottom: 70px;
    right: 20px;
    z-index: 1000001;
    pointer-events: all;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ss-overlay.ss-active .ss-controls {
    opacity: 1;
    transform: translateY(0);
}

/* Control buttons container */
.ss-control-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

/* Control buttons */
.ss-control-btn {
    background-color: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.ss-control-btn:focus {
    outline: none;
}

.ss-control-btn:focus-visible {
    color: white;
    transform: scale(1.1);
}

/* Button content */
.ss-button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ss-button-content svg {
    width: 24px;
    height: 24px;
}

/* Count badge */
.ss-count-badge {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    color: inherit;
}

.ss-control-btn:hover {
    color: white;
    transform: scale(1.1);
}

.ss-control-btn svg {
    width: 24px;
    height: 24px;
}

/* Active states for buttons */
.ss-control-btn.ss-active {
    color: white;
}

.ss-like.ss-active {
    color: #ff4545;
}

.ss-bookmark.ss-active {
    color: #4CAF50;
}

/* Close button - simplified */
.ss-close {
    margin-top: 8px;
}

/* Counter badges */
.ss-counter {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Top bar */
.ss-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

/* Video info */
.ss-video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.ss-video-title {
    font-size: 24px;
    margin-bottom: 8px;
}

.ss-video-description {
    font-size: 16px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.ss-video-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ss-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Unmute instruction */
.ss-unmute-instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
    z-index: 1002;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ss-unmute-instruction.ss-active {
    opacity: 1;
}

/* Share overlay */
.ss-share-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1003;
}

.ss-share-overlay.ss-active {
    transform: translateY(0);
}

.ss-share-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.ss-share-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

/* Like animation */
@keyframes ss-like-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.ss-like-btn.ss-active {
    color: #ff4545;
    animation: ss-like-pulse 0.5s ease;
}

/* Responsive styles */
@media (max-width: 768px) {
    .ss-controls {
        right: 10px;
        bottom: 60px;
    }

    .ss-control-buttons {
        gap: 12px;
    }

    .ss-views-counter {
        top: 10px;
        right: 10px;
    }

    .ss-bottom-controls {
        padding: 0 15px;
        bottom: 15px;
    }

    .ss-control-btn {
        width: 32px;
        height: 32px;
    }

    .ss-button-content svg {
        width: 20px;
        height: 20px;
    }

    .ss-count-badge {
        font-size: 10px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .ss-control-btn:hover {
        transform: none;
    }
}

/* Accessibility */
.ss-control-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Hide video info after timeout */
.ss-video-info.ss-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Logo and text container */
.ss-logo-container {
    position: absolute;
    bottom: 10%;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 4px;
    pointer-events: all;
}

.ss-logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.2s ease;
    opacity: 0.9;
    flex-shrink: 0;
    position: relative;
}

.ss-logo-text {
    display: block;
    color: white;
    font-size: 18px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
    transition: opacity 0.3s ease;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    position: relative;
    transform: translateY(0);
}

/* Hover effects */
.ss-logo-container:hover .ss-logo {
    opacity: 1;
    transform: scale(1.1);
}

.ss-logo-container:hover .ss-logo-text {
    opacity: 1;
}

/* Ensure overlay doesn't affect logo visibility when inactive */
.ss-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.ss-overlay.ss-active {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ss-logo-container {
        gap: 12px;
        right: 10px;
        bottom: 12%;
    }
    
    .ss-logo {
        width: 30px;
        height: 30px;
    }
    
    .ss-logo-text {
        font-size: 16px;
    }
}

/* Remove old whats-next styles */
.ss-whats-next {
    display: none;
}

/* Views counter */
.ss-views-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 1000001;
}

.ss-views {
    margin: 0;
    padding: 0;
    color: white;
}

.ss-views-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Responsive views counter */
@media (max-width: 768px) {
    .ss-views-counter {
        top: 10px;
        right: 10px;
    }
    
    .ss-views-count {
        font-size: 14px;
    }
}

/* Count badge styles */
.ss-count-badge {
    font-size: 12px;
    line-height: 1;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.ss-control-btn:hover .ss-count-badge {
    color: white;
}

.ss-like.ss-active .ss-count-badge {
    color: #ff4545;
}

/* Bottom controls container */
.ss-bottom-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000002;
    pointer-events: all;
}

/* Info button specific styles */
.ss-info {
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.ss-info:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Info overlay */
.ss-info-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000003;
    padding: 20px;
    transform: translateY(100%);
}

.ss-info-overlay.ss-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Info content */
.ss-info-content {
    position: relative;
    width: 100%;
    color: white;
    padding: 20px;
    padding-right: 40px;
}

.ss-info-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    z-index: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.ss-info-close:hover {
    opacity: 1;
}

.ss-info-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
}

.ss-info-description {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
    max-width: 800px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ss-info-content {
        padding: 16px;
        padding-right: 36px;
    }

    .ss-info-title {
        font-size: 20px;
        margin: 0 0 8px;
    }

    .ss-info-description {
        font-size: 14px;
    }

    .ss-info-close {
        top: 16px;
        right: 16px;
    }
}

/* Overlay logo styles */
.ss-overlay-logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000002;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease;
}

.ss-overlay-logo-container:hover {
    transform: scale(1.05);
}

.ss-overlay-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.ss-overlay-logo-text {
    color: white;
    font-size: 16px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: left;
    white-space: nowrap;
    line-height: 1.2;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    margin-top: 0;
}

/* Responsive adjustments for overlay logo */
@media (max-width: 768px) {
    .ss-overlay-logo-container {
        top: 15px;
        left: 15px;
        gap: 8px;
    }
    
    .ss-overlay-logo {
        width: 28px;
        height: 28px;
    }
    
    .ss-overlay-logo-text {
        font-size: 14px;
    }
}

.ss-overlay-logo-container:hover .ss-overlay-logo,
.ss-overlay-logo-container:hover .ss-overlay-logo-text {
    opacity: 1;
}

/* More menu system */
.ss-more-menu,
.ss-bookmarked-list {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.2s ease;
    z-index: 1000004;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ss-more-menu {
    top: 0;
    right: 50px;
}

.ss-bookmarked-list {
    top: -8px;
    right: calc(100% + 8px);
    left: auto;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.ss-bookmarked-list::-webkit-scrollbar {
    width: 4px;
}

.ss-bookmarked-list::-webkit-scrollbar-track {
    background: transparent;
}

.ss-bookmarked-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.ss-more-menu.ss-active,
.ss-bookmarked-list.ss-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.ss-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    border: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 6px;
    margin: 0 8px;
    width: calc(100% - 16px);
}

.ss-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.ss-menu-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.9;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ss-menu-item:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

/* Add arrow for items with submenus */
.ss-menu-item-with-submenu {
    padding-right: 36px;
}

.ss-menu-item-with-submenu::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    width: 0;
    height: 0;
    border-left: 4px solid rgba(255, 255, 255, 0.7);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.ss-menu-item-with-submenu:hover::after {
    opacity: 1;
    border-left-color: white;
    transform: translateY(-50%) translateX(-2px) rotate(180deg);
}

.ss-bookmarked-title {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 6px;
    margin: 0 8px;
    width: calc(100% - 16px);
}

.ss-bookmarked-title::before {
    content: '▶';
    margin-right: 8px;
    font-size: 10px;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.ss-bookmarked-title:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 12px;
}

.ss-bookmarked-title:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.ss-no-bookmarks {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 24px 16px;
    font-size: 14px;
    font-style: italic;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .ss-more-menu {
        right: 45px;
        top: 0;
    }
    
    .ss-bookmarked-list {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        transform: translateY(100%);
        border-radius: 16px 16px 0 0;
        padding: 16px 0;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .ss-bookmarked-list::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    .ss-bookmarked-list.ss-active {
        transform: translateY(0);
    }
    
    .ss-menu-item,
    .ss-bookmarked-title {
        padding: 16px;
        font-size: 16px;
        margin: 0 12px;
        width: calc(100% - 24px);
    }
    
    .ss-menu-item svg {
        width: 24px;
        height: 24px;
    }

    .ss-bookmarked-title {
        max-width: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .ss-bookmarked-title:last-child {
        border-bottom: none;
    }

    .ss-no-bookmarks {
        padding: 32px 16px;
        font-size: 16px;
    }
}

/* Larger screens (iPad Pro, high-res tablets, etc.) */
@media screen and (min-width: 1024px) {
    .ss-control-btn {
        width: 48px;
        height: 48px;
    }

    .ss-button-content svg,
    .ss-control-btn svg {
        width: 32px;
        height: 32px;
    }

    .ss-count-badge {
        font-size: 14px;
    }

    .ss-control-buttons {
        gap: 24px;
    }

    .ss-views svg {
        width: 32px;
        height: 32px;
    }

    .ss-views-count {
        font-size: 18px;
    }

    .ss-overlay-logo {
        width: 40px;
        height: 40px;
    }

    .ss-overlay-logo-text {
        font-size: 20px;
    }

    .ss-menu-item {
        padding: 16px 20px;
        font-size: 16px;
    }

    .ss-menu-item svg {
        width: 28px;
        height: 28px;
    }

    .ss-bookmarked-title {
        padding: 16px 20px;
        font-size: 16px;
    }

    .ss-bookmarked-title::before {
        font-size: 12px;
        margin-right: 12px;
    }
}

/* Extra large screens */
@media screen and (min-width: 1366px) {
    .ss-control-btn {
        width: 56px;
        height: 56px;
    }

    .ss-button-content svg,
    .ss-control-btn svg {
        width: 36px;
        height: 36px;
    }

    .ss-count-badge {
        font-size: 16px;
    }

    .ss-control-buttons {
        gap: 32px;
    }

    .ss-views svg {
        width: 36px;
        height: 36px;
    }

    .ss-views-count {
        font-size: 20px;
    }

    .ss-overlay-logo {
        width: 48px;
        height: 48px;
    }

    .ss-overlay-logo-text {
        font-size: 22px;
    }

    .ss-menu-item {
        padding: 18px 24px;
        font-size: 18px;
    }

    .ss-menu-item svg {
        width: 32px;
        height: 32px;
    }

    .ss-bookmarked-title {
        padding: 18px 24px;
        font-size: 18px;
    }

    .ss-bookmarked-title::before {
        font-size: 14px;
        margin-right: 14px;
    }
}
 
 