/* Container and header */
.ccn-slider-wrapper {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 30px;
    position: relative;
    max-width: 1296px;
    margin: auto;
}

.ccn-header {
    text-align: center;
    margin-bottom: 12px;
}
.ccn-title { font-size: 28px; margin: 0; }
.ccn-subtitle { color: #666; margin: 6px 0 10px; }
.ccn-underline { display: block; margin: 6px auto 0; max-width: 220px; }

.ccn-warning {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

/* viewport */
.ccn-viewport {
    overflow: hidden;
    position: relative;
    margin: 12px 0 8px;
}

/* track is a flex row that will be translated to show slides */
.ccn-track {
    display: flex;
    align-items: center;
    transition: transform 0.45s ease;
    will-change: transform;
    gap: 18px;
    padding: 8px 0;
    box-sizing: border-box;
}

/* base slide */
.ccn-slide {
    box-sizing: border-box;
    flex: 0 0 auto; /* actual basis set by media queries below */
    position: relative;
    cursor: pointer;
    transition: transform .35s ease, filter .35s ease, opacity .35s ease;
    opacity: 0.95;
}

.ccn-slide .ccn-thumb {
    width: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, .3);
    display: block;
    height: auto;
    object-fit: cover;
}

/* overlay play button */
.ccn-slide .ccn-overlay {
    position: absolute;
    inset: 0;
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events: none;
}
.ccn-play {
    pointer-events: auto;
    background: rgba(0,0,0,0.55);
    color: white;
    border: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 20px;
}

/* Mode class: when in 3-visible layout and totalSlides >=3 */
.ccn-mode-3 .ccn-slide { filter: grayscale(100%); opacity: 0.65; }
.ccn-mode-3 .ccn-slide.center { filter: none; opacity: 1; transform: scale(1.03); z-index: 2; }
.ccn-mode-3 .ccn-slide.side { opacity: 0.85; }

/* controls row (arrows and dots) */
.ccn-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    position: relative;
    flex-direction: column;
}

/* nav buttons style */
.ccn-nav-container{
    display: flex;
    flex-direction: row;
}

.ccn-nav {
    background: transparent;
    border: none;
    width: 50px;
    height: 50px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor: pointer;
    margin: 0 10px;
}
.ccn-nav img { 
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0px 2px 3px 1px lightgray;
    border-radius: 8px;
}

/* dots */
.ccn-dots { display: flex; align-items:center; gap: 8px; }
.ccn-dot {
    width: 12px;
    height: 12px;
    background: rgb(53 211 251 / 60%);
    border-radius: 50%;
    cursor: pointer;
    transition: transform .2s, background .2s;
}
.ccn-dot.active { background: #11A2DC; transform: scale(1.05); }

/* Modal */
.ccn-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    align-items:center;
    justify-content:center;
    z-index: 9999;
}
.ccn-modal[aria-hidden="false"] { display:flex; }
.ccn-modal-content {
    width: 90%;
    max-width: 1000px;
    background: #000;
    padding: 8px;
    border-radius: 8px;
    position: relative;
}
.ccn-modal-close {
    position:absolute;
    right:8px;
    top:6px;
    background:transparent;
    color: #fff;
    border:0;
    font-size:20px;
    cursor:pointer;
}
.ccn-modal-body iframe {
    width: 100%;
    height: 560px;
    border: 0;
    border-radius: 6px;
}

/* ----------------------- Responsive bases ----------------------- */
/* Desktop: 3 slides visible */
@media (min-width: 901px) {
    .ccn-slide {
        flex: 0 0 calc((100% - (18px * 2)) / 3);
    }
}

/* Tablet / laptop: 2 slides visible */
@media (max-width: 900px) and (min-width: 601px) {
    .ccn-slide {
        flex: 0 0 calc((100% - 18px) / 2);
    }
}

/* Mobile: 1 slide visible */
@media (max-width: 600px) {
    .ccn-slide {
        flex: 0 0 100%;
    }
    .ccn-modal-body iframe {
        height: 360px;
    }
}
