/* Frontend Styles */
.on-demand-content-wrapper {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 0 auto;
}

/* Tabs Navigation */
.on-demand-tabs {
    display: flex;
    gap: 2px;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    overflow-x: auto;
}

.tab-button {
    padding: 15px 25px;
    background: #f8f9fa;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: #fff;
    color: #333;
}

.tab-button.active {
    background: #fff;
    color: #7653A3;
    border-bottom: 2px solid #7653A3;
}

/* Tab Content */
.on-demand-content-tabs {
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Days Remaining Notice */
.days-remaining-notice {
    background: #f8f9fa;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

/* Content Sections */
.content-section {
    margin-bottom: 30px;
}

.content-section h3 {
    margin: 0 0 20px;
    color: #333;
    font-size: 20px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.video-item {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    text-transform: capitalize;
    padding-bottom: 10px;
}

.video-item:hover {
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: #f8f9fa;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.video-modal-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-trigger:hover {
    opacity: 1;
}

.video-modal-trigger i {
    font-size: 48px;
    color: #fff;
}

.video-title {
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    padding: 10px;

    text-transform: capitalize;
}

/* PDF Grid */
.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.pdf-item {
   
    display: inline-block;
    margin: 10px;
    padding: 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    text-align: center;
    text-transform: capitalize;
    max-width: fit-content;
}


.pdf-item:hover {
    transform: translateY(-2px);
}

.pdf-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.pdf-title i {
    margin-right: 8px;
    color: #7653A3;
}

.pdf-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: #7653A3;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.download-button:hover {
    background: #634589;
    color: #fff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal {
    font-size: 24px;
    color: #666;
    cursor: pointer;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

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

/* Keep existing admin styles */
.acadia-on-demand-content {
    padding: 15px;
}

.video-url-row,
.pdf-file-row {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-url-row input,
.pdf-file-row input {
    margin-right: 0;
}

.upload-video-button,
.upload-pdf-button {
    white-space: nowrap;
    min-width: 100px;
}

.add-video,
.add-pdf {
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .video-url-row,
    .pdf-file-row {
        flex-wrap: wrap;
    }

    .video-url-row input,
    .pdf-file-row input {
        width: 100% !important;
        margin-bottom: 5px;
    }

    .upload-video-button,
    .upload-pdf-button,
    .remove-row {
        width: auto;
        flex: 1;
    }

    .on-demand-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .video-grid,
    .pdf-grid {
        grid-template-columns: 1fr;
    }
}

.section-accordion {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.section-header {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.section-header:after {
    content: '+';
    font-size: 1.5em;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.section-header.active:after {
    content: '-';
}

.section-content {
    display: none;
    padding: 20px;
    background: white;
}

.pdf-section {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
} 

.video-container.loading::before {
    content: 'Loading';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white !important;
    font-size: 16px;
    z-index: 99999;
    height: 100%;
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    font-size: 22px;
    align-items: center;

}

.video-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 53%;
    transform: translate(20px, -50%);
    color: white !important;
    display: flex;
    justify-content: center;
    font-size: 22px;
    align-items: center;
    animation: ellipsis-animation 2s infinite;
    z-index: 99999;
    letter-spacing: 5px;
}

@keyframes ellipsis-animation {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

.on-demand-content .item-access-status {
    font-size: 0.9em;
    margin-top: 5px;
    color: #666;
}

.item-access-status .not-started {
    display: none;
}

.item-access-status .remaining {
    color: #46b450; /* WordPress green */
    font-weight: bold;
}

.item-access-status .expired {
    color: #dc3232; /* WordPress red */
    font-weight: bold;
}

.pdf-item .item-access-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-direction: column;
    gap:10px
}

.pdf-item .item-access-status .button {
    margin-right: 10px;
}

/* On-Demand Confirmation Modal Styles */
.od-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: backdrop-filter 0.2s ease;
}

.od-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    animation: odModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Typography */
.od-modal .od-modal-title {
    color: #4A2159;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.od-modal .od-modal-details p {
    margin: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.5;
    padding: 1rem 0;
}

/* Button Styles */
.od-modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
}

.od-modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
    border: none;
}

/* Primary Button */
.od-modal-btn.confirm {
    background-color: #4A2159;
    color: white;
}

.od-modal-btn.confirm:hover {
    background-color: #3a1947;
}

/* Secondary Button */
.od-modal-btn.back {
    background-color: #f0f0f0;
    color: #333;
}

.od-modal-btn.back:hover {
    background-color: #e0e0e0;
}

/* Disabled State */
.od-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation */
@keyframes odModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}