/* =========================================
   PREMIUM COURSE PLAYER STYLES
   ========================================= */

.premium-player-wrapper {
   display: grid;
   grid-template-columns: 1fr 380px;
   gap: 2rem;
   padding: 2rem;
   max-width: 1400px;
   margin: 0 auto;
   padding-top: 12rem; /* Space for fixed header */
   min-height: 100vh;
}

.course-flash-messages {
   grid-column: 1 / -1;
   align-self: start;
}

.course-flash-messages .assessment-alert {
   margin: 0;
}

@media (max-width: 1024px) {
   .premium-player-wrapper {
      grid-template-columns: 1fr;
   }
}

/* --- Left Column: Video Area --- */
.premium-video-section {
   display: flex;
   flex-direction: column;
   gap: 1.5rem;
}

.premium-video-container {
   position: relative;
   width: 100%;
   padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
   border-radius: 1rem;
   overflow: hidden;
   background: #000;
   box-shadow: 0 10px 30px rgba(0, 255, 0, 0.05), 0 0 0 1px rgba(255,255,255,0.05);
}

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

.premium-video-container video {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   border: none;
   object-fit: contain;
   background: #000;
}

.video-error-message {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   color: #ff6b78;
   font-size: 1.5rem;
   text-align: center;
   padding: 2rem;
   max-width: 80%;
   line-height: 1.6;
}

.premium-course-info {
   background: rgba(255, 255, 255, 0.02);
   border: 1px solid rgba(255, 255, 255, 0.05);
   border-radius: 1rem;
   padding: 2rem;
   backdrop-filter: blur(10px);
}

.premium-course-info h1 {
   font-size: 2.4rem;
   color: #fff;
   margin-bottom: 1rem;
}

.premium-course-info p {
   font-size: 1.5rem;
   color: #aaa;
   line-height: 1.6;
}

/* --- Left Column: Online Radio --- */
.online-radio-list {
   display: flex;
   flex-direction: column;
   align-items: flex-end;
   gap: 1.2rem;
   width: 100%;
}

.online-radio-section {
   grid-column: 1;
   align-self: start;
   display: flex;
   flex-direction: column;
   width: 100%;
   max-width: 38rem;
   margin: 0 0 0 auto;
   gap: 1rem;
   padding: 1.4rem 1.6rem;
   border: 1px solid rgba(0, 255, 0, 0.16);
   border-radius: 1rem;
   background:
      radial-gradient(circle at top right, rgba(0, 255, 0, 0.08), transparent 45%),
      rgba(255, 255, 255, 0.02);
   box-shadow: 0 10px 30px rgba(0, 255, 0, 0.04);
   backdrop-filter: blur(10px);
}

.online-radio-heading,
.online-radio-footer,
.online-radio-controls {
   display: flex;
   align-items: center;
}

.online-radio-heading {
   justify-content: space-between;
   gap: 1rem;
}

.online-radio-eyebrow {
   display: inline-flex;
   align-items: center;
   gap: 0.6rem;
   margin-bottom: 0.35rem;
   color: var(--neon-green, #00ff00);
   font-size: 1.05rem;
   font-weight: 700;
   letter-spacing: 0.08em;
   text-transform: uppercase;
}

.online-radio-heading h2 {
   margin: 0 0 0.25rem;
   color: #fff;
   font-size: 1.7rem;
}

.online-radio-heading p,
.online-radio-status {
   margin: 0;
   color: #aaa;
   font-size: 1.15rem;
}

.online-radio-live {
   display: inline-flex;
   flex-shrink: 0;
   align-items: center;
   gap: 0.45rem;
   padding: 0.4rem 0.65rem;
   border: 1px solid rgba(255, 70, 90, 0.3);
   border-radius: 999px;
   background: rgba(255, 70, 90, 0.1);
   color: #ff6b78;
   font-size: 0.9rem;
   font-weight: 800;
}

.online-radio-live span {
   width: 0.7rem;
   height: 0.7rem;
   border-radius: 50%;
   background: #ff465a;
   box-shadow: 0 0 0.8rem rgba(255, 70, 90, 0.8);
}

.online-radio-player {
   display: flex;
   flex-direction: column;
   gap: 0.9rem;
}

.online-radio-controls {
   gap: 0.7rem;
}

.online-radio-button {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 0.5rem;
   min-width: 8.5rem;
   padding: 0.7rem 1rem;
   border: 1px solid rgba(255, 255, 255, 0.14);
   border-radius: 0.7rem;
   background: rgba(255, 255, 255, 0.07);
   color: #eee;
   font-size: 1.15rem;
   font-weight: 700;
   cursor: pointer;
   transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.online-radio-button:hover:not(:disabled),
.online-radio-button:focus-visible {
   border-color: rgba(0, 255, 0, 0.45);
   background: rgba(0, 255, 0, 0.12);
   color: var(--neon-green, #00ff00);
   transform: translateY(-1px);
}

.online-radio-button:disabled {
   opacity: 0.45;
   cursor: not-allowed;
}

.online-radio-play {
   border-color: rgba(0, 255, 0, 0.3);
   background: rgba(0, 255, 0, 0.1);
   color: var(--neon-green, #00ff00);
}

.online-radio-volume {
   display: flex;
   flex: 1;
   align-items: center;
   gap: 0.65rem;
   min-width: 10rem;
   color: #aaa;
}

.online-radio-volume input {
   width: 100%;
   accent-color: var(--neon-green, #00ff00);
   cursor: pointer;
}

.online-radio-footer {
   justify-content: space-between;
   gap: 1rem;
   padding-top: 0.8rem;
   border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.online-radio-footer a {
   display: inline-flex;
   align-items: center;
   gap: 0.4rem;
   flex-shrink: 0;
   color: var(--neon-green, #00ff00);
   font-size: 1.2rem;
}

/* O CSS global usa ícones de 5rem; no player eles precisam ser compactos. */
.online-radio-eyebrow i {
   width: 1em;
   font-size: 1.6rem;
}

.online-radio-button i,
.online-radio-footer i {
   width: 1em;
   font-size: 1.3rem;
}

.online-radio-volume i {
   width: 1em;
   font-size: 1.6rem;
}

.online-radio-footer a:hover {
   text-decoration: underline;
}

.online-radio-status.is-playing {
   color: var(--neon-green, #00ff00);
}

.online-radio-status.is-error {
   color: #ff6b78;
}

.sr-only {
   position: absolute;
   width: 1px;
   height: 1px;
   padding: 0;
   margin: -1px;
   overflow: hidden;
   clip: rect(0, 0, 0, 0);
   white-space: nowrap;
   border: 0;
}

@media (max-width: 600px) {
   .online-radio-section {
      max-width: none;
   }

   .online-radio-heading,
   .online-radio-footer {
      align-items: flex-start;
      flex-direction: column;
   }

   .online-radio-controls {
      flex-wrap: wrap;
   }

   .online-radio-button {
      flex: 1;
   }

   .online-radio-volume {
      flex-basis: 100%;
   }
}

/* --- Right Column: Lesson List --- */
.course-sidebar {
   display: flex;
   flex-direction: column;
   align-self: start;
   gap: 1.5rem;
   min-width: 0;
}

.course-sidebar #course-assessments,
.course-sidebar .course-certificate-section {
   grid-column: auto;
   width: 100%;
   margin: 0;
}

.premium-lessons-section {
   display: flex;
   flex-direction: column;
   gap: 1.5rem;
}

.premium-lessons-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   background: rgba(255, 255, 255, 0.02);
   border: 1px solid rgba(255, 255, 255, 0.05);
   padding: 1.5rem;
   border-radius: 1rem;
   backdrop-filter: blur(10px);
}

.premium-lessons-header h2 {
   font-size: 1.8rem;
   color: #fff;
}

.premium-progress-text {
   font-size: 1.4rem;
   color: var(--neon-green, #00FF00);
   font-weight: 600;
}

.premium-lessons-list {
   background: rgba(255, 255, 255, 0.02);
   border: 1px solid rgba(255, 255, 255, 0.05);
   border-radius: 1rem;
   padding: 1rem;
   max-height: calc(100vh - 200px);
   overflow-y: auto;
   backdrop-filter: blur(10px);
   display: flex;
   flex-direction: column;
   gap: 0.8rem;
}

/* Custom Scrollbar for lessons */
.premium-lessons-list::-webkit-scrollbar {
   width: 6px;
}
.premium-lessons-list::-webkit-scrollbar-track {
   background: rgba(255, 255, 255, 0.02);
   border-radius: 4px;
}
.premium-lessons-list::-webkit-scrollbar-thumb {
   background: rgba(0, 255, 0, 0.2);
   border-radius: 4px;
}
.premium-lessons-list::-webkit-scrollbar-thumb:hover {
   background: rgba(0, 255, 0, 0.5);
}

.premium-lesson-item {
   display: flex;
   flex-direction: column;
   gap: 1rem;
   padding: 1.2rem;
   border-radius: 0.8rem;
   background: rgba(255, 255, 255, 0.03);
   border: 1px solid transparent;
   transition: all 0.3s ease;
}

[data-assessment-item][hidden] {
   display: none !important;
}

#course-assessments {
   grid-column: 2;
   width: 100%;
   max-width: none;
   padding: 0;
   margin-right: 0;
   margin-left: 0;
   margin-top: -1rem;
}

.course-certificate-section {
   grid-column: 2;
   width: 100%;
   max-width: none;
   padding: 0;
   margin: 0;
}

#course-assessments .assessment-actions {
   width: 100%;
   margin-left: 0;
   justify-content: center;
}

#course-assessments .assessment-professor-actions {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   align-items: stretch;
   gap: 0.8rem;
   width: 100%;
   margin-left: 0;
}

#course-assessments .assessment-professor-actions > a,
#course-assessments .assessment-professor-actions > form,
#course-assessments .assessment-professor-actions > form > button {
   width: 100%;
   height: 100%;
   min-height: 4rem;
   margin: 0;
}

@media (max-width: 1024px) {
   .online-radio-section,
   #course-assessments,
   .course-certificate-section {
      grid-column: 1;
      margin-top: 0;
   }
}

.premium-lesson-item:hover, .premium-lesson-item.active {
   background: rgba(255, 255, 255, 0.08);
   border-color: rgba(0, 255, 0, 0.3);
}

.premium-lesson-item.active {
   background: rgba(0, 255, 0, 0.09);
   border-color: rgba(0, 255, 0, 0.45);
   border-left: 4px solid var(--neon-green, #00FF00);
   box-shadow: 0 0 18px rgba(0, 255, 0, 0.08);
}

.premium-lesson-item.active .premium-lesson-title {
   color: var(--neon-green, #00FF00);
   font-weight: 700;
}

.premium-lesson-main {
   display: flex;
   align-items: center;
   gap: 1.2rem;
}

.premium-lesson-check {
   color: #555;
   font-size: 1.8rem;
   transition: color 0.3s ease;
}

.premium-lesson-check.completed {
   color: var(--neon-green, #00FF00);
}

.premium-lesson-check:hover {
   color: #888;
}
.premium-lesson-check.completed:hover {
   color: #00cc66;
}

.premium-lesson-title {
   font-size: 1.5rem;
   color: #e0e0e0;
   font-weight: 500;
   flex: 1;
   line-height: 1.4;
   cursor: pointer;
}
.premium-lesson-title:hover {
   color: var(--neon-green, #00FF00);
}

.premium-lesson-actions {
   display: flex;
   gap: 0.8rem;
   margin-left: 3rem; /* Align with text */
}

.premium-btn {
   padding: 0.6rem 1.2rem;
   font-size: 1.2rem;
   border-radius: 0.5rem;
   color: #fff;
   background: rgba(255,255,255,0.1);
   border: 1px solid rgba(255,255,255,0.1);
   transition: all 0.3s ease;
   text-align: center;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 0.5rem;
}

.premium-btn:hover {
   background: rgba(255,255,255,0.2);
   color: #fff;
}

.premium-btn.action-arquivos {
   background: rgba(0, 195, 255, 0.1);
   color: #00c3ff;
   border-color: rgba(0, 195, 255, 0.2);
}
.premium-btn.action-arquivos:hover {
   background: rgba(0, 195, 255, 0.2);
}

.premium-btn.action-demo {
   background: rgba(255, 0, 255, 0.1);
   color: #ff00ff;
   border-color: rgba(255, 0, 255, 0.2);
}
.premium-btn.action-demo:hover {
   background: rgba(255, 0, 255, 0.2);
}

.premium-btn.action-edit {
   background: rgba(255, 170, 0, 0.1);
   color: #ffaa00;
   border-color: rgba(255, 170, 0, 0.2);
}
.premium-btn.action-edit:hover {
   background: rgba(255, 170, 0, 0.2);
}

.premium-btn.action-delete {
   background: rgba(255, 50, 50, 0.1);
   color: #ff3232;
   border-color: rgba(255, 50, 50, 0.2);
}
.premium-btn.action-delete:hover {
   background: rgba(255, 50, 50, 0.2);
}

.premium-btn-success {
   background: rgba(0, 255, 0, 0.1);
   color: #00FF00;
   border-color: rgba(0, 255, 0, 0.3);
   padding: 1rem 2rem;
   font-size: 1.4rem;
   border-radius: 0.8rem;
   text-align: center;
   display: block;
   margin-top: 1rem;
   transition: all 0.3s;
}

.premium-btn-success:hover {
   background: rgba(0, 255, 0, 0.2);
   box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
   color: #00FF00;
}

/* Fix icon sizes overriding any global styles */
.premium-lessons-section i,
.premium-lessons-section svg {
    font-size: inherit;
    line-height: inherit;
}
.premium-lesson-check i,
.premium-lesson-check svg {
    font-size: 2.2rem;
    width: 1em;
    height: 1em;
}
.premium-btn i,
.premium-btn svg {
    font-size: 1.4rem;
    width: 1em;
    height: 1em;
}
p i.fa-info-circle,
p svg.fa-info-circle {
    font-size: 1.4rem;
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: text-bottom;
}

/* --- Drag & Drop Reordering --- */
.drag-handle {
   color: #555;
   font-size: 1.6rem;
   cursor: grab;
   padding: 0.2rem 0.4rem;
   border-radius: 0.4rem;
   transition: color 0.2s, background 0.2s;
   display: flex;
   align-items: center;
   user-select: none;
   flex-shrink: 0;
}
.drag-handle:hover {
   color: var(--neon-green, #00FF00);
   background: rgba(0, 255, 0, 0.08);
}
.drag-handle:active {
   cursor: grabbing;
}
.drag-handle i,
.drag-handle svg {
   font-size: 1.6rem;
   width: 1em;
   height: 1em;
   pointer-events: none;
}

.premium-lesson-item.dragging {
   opacity: 0.4;
   border: 1px dashed rgba(0, 255, 0, 0.4);
   background: rgba(0, 255, 0, 0.03);
}

.premium-lesson-item.drag-over-top {
   border-top: 3px solid var(--neon-green, #00FF00);
   margin-top: -2px;
}
.premium-lesson-item.drag-over-bottom {
   border-bottom: 3px solid var(--neon-green, #00FF00);
   margin-bottom: -2px;
}

.drag-sort-toast {
   position: fixed;
   bottom: 2rem;
   right: 2rem;
   padding: 1rem 2rem;
   border-radius: 0.8rem;
   font-size: 1.3rem;
   z-index: 9999;
   opacity: 0;
   transform: translateY(1rem);
   transition: opacity 0.3s, transform 0.3s;
   pointer-events: none;
}
.drag-sort-toast.show {
   opacity: 1;
   transform: translateY(0);
}
.drag-sort-toast.success {
   background: rgba(0, 255, 0, 0.15);
   color: #00FF00;
   border: 1px solid rgba(0, 255, 0, 0.3);
}
.drag-sort-toast.error {
   background: rgba(255, 50, 50, 0.15);
   color: #ff3232;
   border: 1px solid rgba(255, 50, 50, 0.3);
}
