/**
 * Custom Course Manager - Public CSS
 * Combined styles for all public-facing templates
 */

/* Common Elements
---------------------------------------------- */
.ccm-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.ccm-button:hover {
    background-color: #005177;
    color: white;
    text-decoration: none;
}

/* Course List & Grid
---------------------------------------------- */
.ccm-course-list-container {
    margin: 20px 0;
}

.ccm-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ccm-course-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 250px;
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
}

.ccm-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.ccm-course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.ccm-course-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.ccm-course-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.ccm-course-title a {
    color: #fff;
    text-decoration: none;
}

.ccm-course-title,
.ccm-course-title a {
    color: #ffffff;
    font-size: 18px !important;
    text-transform: uppercase;
    font-weight: 700;
}

.ccm-course-excerpt {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
    flex-grow: 1;
}

.ccm-course-actions {
    margin-top: auto;
}

.ccm-no-courses {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.ccm-course-price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #22a45d;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 3;
}

.ccm-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 18px;
    font-size: 0.9em;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.ccm-course-instructor {
    color: #fff;
    margin-bottom: 10px;
}

/* Dashboard Page
---------------------------------------------- */
.ccm-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ccm-dashboard-header h2 {
    margin: 0;
    color: white;
    font-size: 28px;
    font-weight: 600;
}

.ccm-user-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.welcome-text,
.logout-link {
    margin: 8px 0;
    line-height: 1.5;
}

.welcome-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: right;
}

.logout-link a {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #dc3545;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
}

.logout-link a:before {
    content: "🚪";
    margin-right: 8px;
    font-size: 14px;
}

.logout-link a:hover {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Session Page
---------------------------------------------- */
.ccm-single-session {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Header styling */
.ccm-session-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 20px;
}

.ccm-course-breadcrumb {
    margin-bottom: 15px;
}

.ccm-course-breadcrumb a {
    display: inline-flex;
    align-items: center;
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.ccm-course-breadcrumb a:hover {
    color: #135e96;
    text-decoration: underline;
}

.ccm-course-breadcrumb .dashicons {
    margin-right: 5px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ccm-session-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.ccm-session-progress {
    margin-top: 15px;
}

.ccm-progress-text {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.ccm-progress-bar {
    height: 8px;
    background-color: #e9e9e9;
    border-radius: 4px;
    overflow: hidden;
}

.ccm-progress-indicator {
    height: 100%;
    background-color: #2271b1;
    border-radius: 4px;
    transition: width 0.3s;
}

/* Video section styling - YouTube-like layout with 100% width video */
.ccm-session-videos {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

/* Main video container (100% width) */
.ccm-video-main-container {
    width: 100%;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Video player wrapper */
.ccm-video-player-wrapper {
    background-color: #0f0f0f;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.ccm-video-container {
    background-color: #0f0f0f;
    overflow: hidden;
}

.ccm-active-video-player {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

#ccm-main-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ccm-video-details {
    padding: 20px 0;
    background-color: white;
}

.ccm-active-video-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    line-height: 1.4;
}

.ccm-active-video-description {
    font-size: 15px;
    color: #505050;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Session content styling */
.ccm-session-description {
    margin-top: 20px;
}

.ccm-session-content-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.ccm-session-content-text {
    font-size: 15px;
    color: #505050;
    line-height: 1.6;
}

.ccm-videos-playlist {
    width: 100%;
    max-width: 100%;
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    max-height: 400px; /* Reduced height for 100% width layout */
}

.ccm-videos-playlist h3 {
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.ccm-playlist-header {
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.ccm-playlist-counter {
    padding: 10px 20px;
    font-size: 14px;
    color: #666;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.ccm-playlist-items {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.ccm-playlist-items::-webkit-scrollbar {
    width: 8px;
}

.ccm-playlist-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ccm-playlist-items::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 4px;
    border: 2px solid #f1f1f1;
}

.ccm-playlist-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
}

.ccm-playlist-item:hover {
    background-color: #efefef;
}

.ccm-playlist-item.active {
    background-color: #e6f2fa;
    border-left: 3px solid #2271b1;
}

.ccm-video-thumbnail {
    position: relative;
    flex: 0 0 120px;
    height: 68px;
    overflow: hidden;
    margin-right: 12px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ccm-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ccm-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.ccm-playlist-item:hover .ccm-play-overlay {
    opacity: 1;
}

.ccm-play-overlay .dashicons {
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccm-video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 2px;
    font-weight: 500;
}

.ccm-playlist-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ccm-playlist-item-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.ccm-playlist-item-description {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* Session content styling */
.ccm-session-description {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.ccm-session-description h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.ccm-session-description p {
    margin-bottom: 1.2em;
    font-size: 16px;
}

.ccm-session-description ul,
.ccm-session-description ol {
    margin-left: 20px;
    margin-bottom: 1.2em;
}

.ccm-session-description img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.ccm-no-content {
    background-color: #f8f8f8;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    border: 1px dashed #ddd;
}

.ccm-no-content p {
    color: #777;
    font-size: 16px;
    margin: 0;
}

/* Navigation styling */
.ccm-session-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.ccm-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background-color: #f5f5f5;
    border-radius: 30px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    max-width: 45%;
}

.ccm-nav-link:hover {
    background-color: #e5e5e5;
    color: #000;
    text-decoration: none;
}

.ccm-prev-link .dashicons {
    margin-right: 8px;
}

.ccm-next-link .dashicons {
    margin-left: 8px;
}

.ccm-nav-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Access Denied
---------------------------------------------- */
.ccm-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ccm-page-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.ccm-access-denied {
    text-align: center;
    background-color: #fff;
    padding: 50px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.ccm-access-denied-icon {
    margin-bottom: 20px;
}

.ccm-access-denied-icon .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    background: #f1f1f1;
    border-radius: 50%;
    padding: 15px;
    color: #e74c3c;
}

.ccm-access-denied h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.ccm-access-denied p {
    margin-bottom: 25px;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Video.js custom skin */
.video-js {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.video-js .vjs-control-bar {
    background-color: rgba(0, 0, 0, 0.7);
    height: 44px;
    padding: 0 15px;
}

.video-js .vjs-big-play-button {
    background-color: rgba(255, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    line-height: 70px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s;
}

.video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus {
    background-color: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-js .vjs-progress-holder {
    height: 5px;
}

.video-js .vjs-play-progress {
    background-color: #ff0000;
}

.video-js .vjs-volume-panel {
    margin-right: 10px;
}

.video-js .vjs-slider {
    background-color: rgba(255, 255, 255, 0.3);
}

.video-js .vjs-load-progress {
    background: rgba(255, 255, 255, 0.3);
}

.video-js .vjs-time-control {
    font-size: 14px;
    padding-left: 5px;
    padding-right: 5px;
}

.video-js .vjs-remaining-time {
    display: none;
}

/* Login & Registration
---------------------------------------------- */
.ccm-login-container,
.ccm-registration-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ccm-login-form,
.ccm-registration-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.ccm-login-header,
.ccm-registration-header {
    text-align: center;
    margin-bottom: 25px;
}

.ccm-login-header h2,
.ccm-registration-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px;
}

.ccm-login-field,
.ccm-registration-field {
    margin-bottom: 20px;
}

.ccm-login-field label,
.ccm-registration-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.ccm-login-field input,
.ccm-registration-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.ccm-login-actions,
.ccm-registration-actions {
    margin-top: 25px;
}

.ccm-login-button,
.ccm-registration-button {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.ccm-login-button:hover,
.ccm-registration-button:hover {
    background: #005177;
}

.ccm-login-footer,
.ccm-registration-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.ccm-login-footer a,
.ccm-registration-footer a {
    color: #0073aa;
    text-decoration: none;
}

.ccm-login-footer a:hover,
.ccm-registration-footer a:hover {
    text-decoration: underline;
}

.ccm-login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Legacy CSS - replaced with flexbox layout above */

/* Video list item */
.ccm-video-item {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.ccm-video-item:hover {
    background: #f0f0f0;
}

.ccm-video-item.active {
    background: #e6f2fa;
    font-weight: bold;
}

/* AWS Video Player Styles
---------------------------------------------- */
.ccm-aws-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.ccm-secure-video {
    width: 100%;
    height: 100%;
    outline: none;
}

.ccm-secure-video::-webkit-media-controls {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-panel {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-play-button {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-timeline {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-mute-button {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.ccm-secure-video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.ccm-video-watermark {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 3px !important;
    font-size: 12px !important;
    z-index: 1000 !important;
    pointer-events: none !important;
    font-family: Arial, sans-serif !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Disable selection on AWS video containers */
.ccm-aws-video-container.no-select {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Custom video controls overlay for AWS videos */
.ccm-aws-video-container .ccm-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 10px;
    display: none;
    z-index: 999;
}

.ccm-aws-video-container:hover .ccm-custom-controls {
    display: block;
}

.ccm-custom-play-button {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.3s;
}

.ccm-custom-play-button:hover {
    background: rgba(255, 255, 255, 1);
}

.ccm-custom-play-button:before {
    content: '\25B6';
    font-size: 14px;
    color: #333;
    margin-left: 2px;
}

.ccm-custom-play-button.paused:before {
    content: '\25B6';
}

.ccm-custom-play-button.playing:before {
    content: '\23F8';
    margin-left: 0;
}

/* Custom Play Overlay for Disabled Controls */
.ccm-custom-play-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1001 !important;
    display: none !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    width: 80px !important;
    height: 80px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.ccm-custom-play-overlay:hover {
    background: rgba(0, 0, 0, 0.7) !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
}

.ccm-custom-play-overlay .ccm-custom-play-button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 24px !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ccm-custom-play-overlay .ccm-custom-play-button:before {
    content: '\25B6' !important;
    margin-left: 3px !important;
}

/* Prevent video inspection and selection */
.ccm-aws-video-container * {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Hide browser video controls more aggressively */
.ccm-secure-video::-webkit-media-controls-panel,
.ccm-secure-video::-webkit-media-controls-overlay-enclosure,
.ccm-secure-video::-webkit-full-page-media-controls-background {
    display: none !important;
}

/* Ensure watermark stays on top */
.ccm-video-watermark {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 2147483647 !important; /* Maximum z-index */
    pointer-events: none !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Loading state for AWS videos */
.ccm-aws-video-container.loading:before {
    content: 'Loading secure video...' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    z-index: 1000 !important;
}

/* Canvas Video Player Styles
---------------------------------------------- */
.ccm-canvas-video-player {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin: 50px auto; /* Center the player with margin */
    max-width: 100%;
    display: block; /* Ensure it's a block element for centering */
    height: 600px; /* Fixed height */
    width: auto; /* Let width adjust based on aspect ratio */
}

/* Mobile responsive - smaller height */
@media (max-width: 768px) {
    .ccm-canvas-video-player {
        height: 300px; /* Smaller height for mobile */
    }
    
    .ccm-video-canvas {
        height: 300px; /* Match mobile player height */
    }
}

.ccm-video-canvas {
    width: 100%;
    height: 600px; /* Fixed height matching player */
    display: block;
    cursor: pointer;
    background: #000;
}

.ccm-source-video {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

.ccm-canvas-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 10;
}

.ccm-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ccm-canvas-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
    height: 60px; /* Fixed height for controls */
    min-height: 60px; /* Ensure minimum height */
}

.ccm-canvas-video-player:hover .ccm-canvas-controls {
    opacity: 1;
}

/* Ensure controls are always visible for all video players */
.ccm-canvas-video-player .ccm-canvas-controls {
    opacity: 0.7 !important;
}

.ccm-canvas-video-player:hover .ccm-canvas-controls {
    opacity: 1 !important;
}

/* Force visibility for controls with the visible class */
.ccm-canvas-controls.ccm-controls-visible {
    opacity: 1 !important;
    display: flex !important;
    visibility: visible !important;
}

.ccm-canvas-video-player:hover .ccm-canvas-controls.ccm-controls-visible {
    opacity: 1 !important;
}

.ccm-control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.2s;
}

.ccm-control-btn:hover {
    background: rgba(255,255,255,0.2);
}

.ccm-progress-container {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ccm-progress-fill {
    height: 100%;
    background: #ff0000;
    border-radius: 4px;
    transition: width 0.1s linear;
    position: relative;
}

.ccm-progress-handle {
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.ccm-progress-container:hover .ccm-progress-handle {
    opacity: 1;
}

.ccm-time-display {
    color: white;
    font-size: 13px;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-width: 80px;
}

.ccm-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ccm-volume-slider {
    width: 60px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.ccm-volume-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.1s;
}

/* Canvas player in fullscreen */
.ccm-canvas-video-player:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    margin: 0 !important;
    max-width: none !important;
}

.ccm-canvas-video-player:-webkit-full-screen .ccm-video-canvas {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain;
}

.ccm-canvas-video-player:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    margin: 0 !important;
    max-width: none !important;
}

.ccm-canvas-video-player:-moz-full-screen .ccm-video-canvas {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain;
}

.ccm-canvas-video-player:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    margin: 0 !important;
    max-width: none !important;
}

.ccm-canvas-video-player:fullscreen .ccm-video-canvas {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain;
}

/* Enhanced security styles */
.ccm-canvas-video-player,
.ccm-canvas-video-player * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ccm-volume-container {
        display: none;
    }
    
    .ccm-canvas-controls {
        padding: 10px;
        gap: 8px;
    }
    
    .ccm-control-btn {
        padding: 6px;
        font-size: 14px;
    }
    
    .ccm-time-display {
        font-size: 12px;
        min-width: 70px;
    }
    
    .ccm-canvas-video-container {
        padding: 10px;
        margin: 10px 0;
    }
    
    .ccm-video-wrapper {
        max-width: 100%;
    }
    
    .ccm-video-title {
        font-size: 16px;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .ccm-canvas-controls {
        padding: 8px;
        gap: 6px;
    }
    
    .ccm-progress-container {
        height: 6px;
    }
    
    .ccm-time-display {
        font-size: 11px;
        min-width: 60px;
    }
    
    .ccm-canvas-video-container {
        padding: 5px;
        min-height: 300px;
    }
    
    .ccm-video-title {
        font-size: 14px;
        padding: 10px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ccm-video-watermark {
        top: 10px !important;
        right: 10px !important;
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
}

/* Responsive design */
@media (max-width: 991px) {
    .ccm-session-videos {
        flex-direction: column;
        gap: 20px;
    }

    .ccm-videos-playlist {
        flex: none;
        max-height: 400px;
        order: 2; /* Move playlist below video on mobile */
    }
    
    .ccm-video-main-container {
        order: 1; /* Keep video on top on mobile */
    }
}

@media (max-width: 767px) {
    .ccm-dashboard-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 15px;
        gap: 15px;
    }

    .ccm-dashboard-header h2 {
        font-size: 24px;
    }

    .ccm-user-info {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .welcome-text {
        text-align: center;
        margin-bottom: 10px;
    }

    .logout-link a {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .ccm-session-title {
        font-size: 26px;
    }

    .ccm-session-description h2 {
        font-size: 22px;
    }

    .ccm-session-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .ccm-nav-link {
        max-width: 100%;
    }

    .ccm-access-denied {
        padding: 30px 20px;
    }

    .ccm-button {
        display: block;
        margin: 0 auto 15px;
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .ccm-session-title {
        font-size: 22px;
    }

    .ccm-playlist-item {
        padding: 10px;
    }

    .ccm-video-thumbnail {
        flex: 0 0 100px;
        height: 56px;
    }

    .ccm-session-description {
        padding: 15px;
    }
}

/* VdoCipher Video Integration
---------------------------------------------- */
#ccm-vdocipher-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ccm-vdocipher-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* VdoCipher loading state */
.ccm-vdocipher-loading {
    color: white;
    text-align: center;
    padding: 20px;
}

/* Ensure VdoCipher player responsiveness */
.ccm-video-container #ccm-vdocipher-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.ccm-video-container #ccm-vdocipher-container iframe,
.ccm-video-container #ccm-vdocipher-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* AWS CloudFront Video Integration
---------------------------------------------- */
.ccm-aws-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.ccm-aws-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ccm-video-watermark {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
}

.ccm-secure-video {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Ensure AWS video player responsiveness */
.ccm-video-container .ccm-aws-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.ccm-video-container .ccm-aws-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Login/Logout Shortcode Styles
---------------------------------------------- */
.ccm-shortcode-login-container,
.ccm-shortcode-logout-container {
    display: inline-block;
    margin: 0;
}

/* Button Style (Default) */
.ccm-shortcode-login-btn.ccm-shortcode-button,
.ccm-shortcode-logout-btn.ccm-shortcode-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1;
}

/* Login Button Colors */
.ccm-shortcode-login-btn.ccm-shortcode-button {
    background-color: #0073aa;
    color: white;
}

.ccm-shortcode-login-btn.ccm-shortcode-button:hover {
    background-color: #005177;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
}

/* Logout Button Colors */
.ccm-shortcode-logout-btn.ccm-shortcode-button {
    background-color: rgba(255, 255, 255, 0.9);
    color: #dc3545;
}

.ccm-shortcode-logout-btn.ccm-shortcode-button:hover {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Link Style */
.ccm-shortcode-login-btn.ccm-shortcode-link,
.ccm-shortcode-logout-btn.ccm-shortcode-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.ccm-shortcode-login-btn.ccm-shortcode-link {
    color: #0073aa;
}

.ccm-shortcode-login-btn.ccm-shortcode-link:hover {
    color: #005177;
    text-decoration: underline;
}

.ccm-shortcode-logout-btn.ccm-shortcode-link {
    color: #dc3545;
}

.ccm-shortcode-logout-btn.ccm-shortcode-link:hover {
    color: #c82333;
    text-decoration: underline;
}

/* Custom Style (inherits theme styles) */
.ccm-shortcode-login-btn.ccm-shortcode-custom,
.ccm-shortcode-logout-btn.ccm-shortcode-custom {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* Icons */
.ccm-login-icon,
.ccm-logout-icon {
    margin-right: 8px;
    font-size: 14px;
    display: inline-block;
}

/* Header Integration Styles */
.site-header .ccm-shortcode-login-container,
.site-header .ccm-shortcode-logout-container,
header .ccm-shortcode-login-container,
header .ccm-shortcode-logout-container {
    margin: 0 10px;
}

/* Navigation Menu Integration */
.main-navigation .ccm-shortcode-login-container,
.main-navigation .ccm-shortcode-logout-container,
nav .ccm-shortcode-login-container,
nav .ccm-shortcode-logout-container {
    display: inline-block;
    margin: 0 10px;
}

/* Widget Area Integration */
.widget .ccm-shortcode-login-container,
.widget .ccm-shortcode-logout-container {
    display: block;
    text-align: center;
    margin: 10px 0;
}

.widget .ccm-shortcode-login-btn,
.widget .ccm-shortcode-logout-btn {
    width: 100%;
    justify-content: center;
    max-width: 200px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ccm-shortcode-login-btn,
    .ccm-shortcode-logout-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .ccm-login-icon,
    .ccm-logout-icon {
        margin-right: 6px;
        font-size: 12px;
    }
    
    .site-header .ccm-shortcode-login-container,
    .site-header .ccm-shortcode-logout-container,
    header .ccm-shortcode-login-container,
    header .ccm-shortcode-logout-container {
        margin: 5px;
    }
}

/* Video Protection Styles
---------------------------------------------- */
.ccm-protection-warning {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: linear-gradient(135deg, #ff4444, #cc0000) !important;
    color: white !important;
    padding: 20px !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(255, 68, 68, 0.3) !important;
    z-index: 999999 !important;
    max-width: 350px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    animation: ccm-protection-slide-in 0.3s ease-out !important;
}

.ccm-protection-warning h3 {
    margin: 0 0 10px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.ccm-protection-warning p {
    margin: 0 !important;
    opacity: 0.9 !important;
}

.ccm-protection-close {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 20px !important;
    cursor: pointer !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s !important;
}

.ccm-protection-close:hover {
    opacity: 1 !important;
}

.ccm-video-hidden-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #1a1a1a, #333) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    z-index: 1000 !important;
    backdrop-filter: blur(20px) !important;
}

.ccm-video-hidden-overlay .icon {
    font-size: 64px !important;
    margin-bottom: 20px !important;
    opacity: 0.7 !important;
}

.ccm-video-hidden-overlay h3 {
    font-size: 24px !important;
    margin: 0 0 15px 0 !important;
    font-weight: 300 !important;
}

.ccm-video-hidden-overlay p {
    font-size: 16px !important;
    margin: 0 !important;
    opacity: 0.8 !important;
    text-align: center !important;
    max-width: 400px !important;
    line-height: 1.5 !important;
}

@keyframes ccm-protection-slide-in {
    from {
        transform: translateX(100%) !important;
        opacity: 0 !important;
    }
    to {
        transform: translateX(0) !important;
        opacity: 1 !important;
    }
}

.ccm-video-canvas.protected {
    filter: blur(20px) opacity(0.3) !important;
    pointer-events: none !important;
}

/* Enhanced Canvas Player Security */
.ccm-protected-player {
    position: relative;
    overflow: hidden;
}

.ccm-protected-player .ccm-video-canvas {
    transition: filter 0.3s ease;
}

.ccm-protected-player.recording-detected .ccm-video-canvas {
    filter: blur(20px) opacity(0.3);
    pointer-events: none;
}

/* Disable selection on protected content */
.ccm-protected-player,
.ccm-canvas-video-player {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}