/*
 * CJJF Coach Videos Portal CSS
 */

.cjjf-coach-videos-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cjjf-portal-header {
    margin-bottom: 30px;
    text-align: center;
}

.cjjf-portal-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.cjjf-current-week-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.cjjf-current-week-info h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.cjjf-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cjjf-badge-current {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.cjjf-week-selector {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cjjf-week-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.cjjf-week-selector select {
    width: 100%;
    max-width: 600px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.cjjf-week-selector noscript {
    margin-top: 10px;
}

.cjjf-video-selector {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.cjjf-video-selector-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cjjf-video-selector-field {
    display: grid;
    flex: 1 1 200px;
    gap: 8px;
}

.cjjf-video-selector-field label {
    font-weight: 600;
    color: #2c3e50;
}

.cjjf-video-selector-field select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    font-size: 1rem;
}

.cjjf-video-selector-submit {
    min-height: 42px;
    padding: 8px 18px;
    border: 0;
    border-radius: 4px;
    background: #2c3e50;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.cjjf-video-selector-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cjjf-video-selector-links li + li {
    margin-top: 10px;
}

.cjjf-video-selector-links a {
    display: block;
    padding: 14px 16px;
    border: 1px solid #e2e5e9;
    border-radius: 6px;
    background: #fff;
    color: #2c3e50;
    text-decoration: none;
}

.cjjf-video-selector-links a:hover,
.cjjf-video-selector-links a:focus {
    border-color: #667eea;
    color: #4d5fc3;
}

.cjjf-video-selector-empty {
    padding: 18px;
    border-radius: 6px;
    background: #f8f9fa;
}

.cjjf-video-count {
    margin-bottom: 30px;
    text-align: center;
    color: #6c757d;
}

.cjjf-videos-by-language {
    display: grid;
    gap: 30px;
}

.cjjf-language-group {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cjjf-language-group h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.cjjf-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 1024px) {
    .cjjf-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cjjf-video-grid {
        grid-template-columns: 1fr;
    }
}

.cjjf-video-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cjjf-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cjjf-video-header {
    margin-bottom: 15px;
}

.cjjf-video-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cjjf-video-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #6c757d;
}

.cjjf-video-language {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.cjjf-video-week {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.cjjf-video-body {
    margin-top: 15px;
}

.cjjf-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}

.cjjf-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.cjjf-video-actions {
    text-align: center;
}

.cjjf-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cjjf-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cjjf-btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653d8a 100%);
    color: white;
}

.cjjf-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.cjjf-no-videos {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cjjf-no-videos p {
    color: #6c757d;
    font-size: 1.1rem;
}

.cjjf-no-week {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cjjf-no-week p {
    color: #6c757d;
    font-size: 1.1rem;
}

.cjjf-no-week p + p {
    margin-top: 15px;
}

/* Accessibility */
.cjjf-video-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cjjf-video-card:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cjjf-btn-primary {
        border: 2px solid #000;
    }
}

/* PWA Installation Prompt */
.cjjf-pwa-banner,
.cjjf-ios-instructions,
.cjjf-pwa-installed {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cjjf-pwa-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.cjjf-pwa-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cjjf-pwa-banner .cjjf-pwa-content {
    background: transparent;
    color: white;
}

.cjjf-pwa-banner .cjjf-pwa-text p {
    margin: 0;
    color: white;
    font-size: 0.9rem;
}

.cjjf-pwa-icon {
    font-size: 1.5rem;
}

.cjjf-pwa-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cjjf-pwa-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cjjf-ios-content {
    background: white;
    color: #2c3e50;
    max-width: 100%;
}

.cjjf-ios-content p {
    margin: 5px 0;
    font-size: 0.85rem;
}

.cjjf-ios-content strong {
    color: #667eea;
}

.cjjf-ios-instructions {
    background: white;
    border: 2px solid #667eea;
}

.cjjf-pwa-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 15px 25px;
    justify-content: center;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .cjjf-pwa-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cjjf-pwa-banner,
    .cjjf-ios-instructions,
    .cjjf-pwa-installed {
        width: 95%;
        bottom: 10px;
    }
}
