UNPKG

spectatr-player-sdk

Version:

A custom video player built with Stencil with Shaka Player integration

221 lines (195 loc) 4.32 kB
.quiz-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: start; z-index: 300; } .quiz-modal { border-radius: 12px; margin: 10px; max-width: 40%; min-width: 30%; /* max-height: 100vh; */ min-height: 30%; max-height: 95%; overflow-y: auto; } .quiz-header { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 1px solid var(--vp-controls-bg); } .quiz-header h3 { margin: 0; color: var(--vp-text); font-size: 18px; } .close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--vp-text); padding: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; } .quiz-content { padding: 2px 10px; } .quiz-question { font-size: 16px; font-weight: 500; margin-bottom: 8px; color: var(--vp-text); line-height: 1.5; } .submit-text { color: var(--vp-text); } .quiz-options { display: flex; flex-direction: column; gap: 4px; } .quiz-option { background: var(--vp-controls-bg); color: var(--vp-video-text); padding: 15px; border-radius: 8px; cursor: pointer; transition: all 0.2s; text-align: right; font-size: 14px; } /* Styles for the quiz notification */ .quiz-notification-container { position: absolute; top: 16px; z-index: 10; display: flex; align-items: center; gap: 4px; } .quiz-info-icon { width: 24px; height: 24px; background-color: var(--vp-controls-bg); color: var(--vp-video-text); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; cursor: pointer; border: 2px solid var(--vp-video-text); } .quiz-info-icon:hover { transform: scale(1.1); } .quiz-alert-strip { position: absolute; white-space: nowrap; background-color: var(--vp-controls-bg); color: var(--vp-video-text); padding: 6px 16px; border-radius: 4px; animation: slideIn 0.5s forwards, fadeOut 0.5s 6s forwards; transform: translateX(100%); opacity: 0; cursor: pointer; } .quiz-option-full { position: relative; width: 100%; padding: 12px 16px; margin-bottom: 8px; border: none; text-align: left; font-weight: 500; border-radius: 6px; border: 1px solid var(--vp-accent); color: var(--vp-video-text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.3s ease; } .quiz-option-full.voted { cursor: default; border: none; color: var(--vp-video-text); background-color: var(--vp-controls-bg); } .quiz-option-full.selected { font-weight: bold; opacity: 0.7; } .quiz-option-full.correct-opt { font-weight: bold; color: white; border: 1px solid rgba(0, 128, 0, 0.5); background: rgba(0, 128, 0, 0.5); } .quiz-option-full.incorrect-opt { font-weight: bold; color: white; border: 1px solid rgba(255, 0, 0, 0.5); background: rgba(255, 0, 0, 0.5); } @media (max-width: 768px) { .quiz-modal { max-width: 85%; min-width: 65%; margin: 20px; } .quiz-content { padding: 15px; } } .quiz-content .submit-btn { display: block; margin: 0% auto; padding: 0.4rem 0.8rem; font-size: 0.8rem; font-weight: 600; color: var(--vp-video-text); background-color: var(--vp-accent); border: none; border-radius: 0.375rem; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .quiz-content .submit-btn:hover:not(:disabled) { background-color: var(--vp-video-text); color: var(--vp-accent); transform: translateY(-1px); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .quiz-content .submit-btn:active:not(:disabled) { color: var(--vp-video-text); background-color: var(--vp-accent); transform: translateY(0); } .quiz-content .submit-btn:disabled { background-color: #9ca3af; cursor: not-allowed; opacity: 0.7; } .quiz-content .submit-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); }