/* =============================================
   Base
============================================= */
.page-title {
    font-size: 1.75rem;
    color: #1a1a1a;
}

/* =============================================
   Add Video Button
============================================= */
.btn-add-video {
    background-color: #0b7665;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.18s;
}

    .btn-add-video:hover,
    .btn-add-video:focus {
        background-color: #095e51;
        color: #fff;
    }

.search-card,
.table-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}

.search-input-group .input-group-text {
    background: #fff;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    border-color: #dee2e6;
}

.search-input-group .form-control {
    border-left: 0;
    border-radius: 0 8px 8px 0;
    border-color: #dee2e6;
    height: 42px;
}

    .search-input-group .form-control:focus {
        box-shadow: none;
        border-color: #0b7665;
    }

        .search-input-group .form-control:focus + .input-group-text,
        .search-input-group:focus-within .input-group-text {
            border-color: #0b7665;
        }

.lang-label {
    font-size: 0.88rem;
    color: #495057;
    font-weight: 500;
}

.lang-select {
    min-width: 180px;
    height: 42px;
    border: 1px solid #d9dee5;
    border-radius: 10px;
    background-color: #fff;
    color: #212529;
    font-size: 15px;
    font-weight: 500;
    padding-left: 14px;
    padding-right: 38px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

    .lang-select:focus {
        border-color: #0b7665;
        box-shadow: 0 0 0 3px rgba(11,118,101,.12);
    }


.btn-filter {
    height: 42px;
    width: 42px;
    padding: 0;
    border-radius: 8px;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #0b7665;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

    .btn-filter:hover {
        background: #f0faf8;
        border-color: #0b7665;
    }

.table thead tr {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    letter-spacing: 0.04em;
    padding: 14px 18px;
    text-transform: uppercase;
    border-bottom: none;
    white-space: nowrap;
    background: transparent;
}

.table tbody td {
    padding: 16px 18px;
    border-color: #f0f2f4;
    vertical-align: middle;
    color: #343a40;
    font-size: 0.92rem;
}

.table-hover tbody tr:hover {
    background-color: #f7fdfb;
}

.title-col {
    color: #1a1a1a;
    font-weight: 600;
}

.lang-col {
    color: #495057;
}

.date-col {
    color: #6c757d;
    white-space: nowrap;
}

.desc-cell {
    display: block;
    max-width: 300px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #6c757d;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.15s;
}

    .action-icon:hover {
        opacity: 0.7;
    }

.edit-icon {
    color: #6c757d;
}

.delete-icon {
    color: #6c757d;
}

    .delete-icon:hover {
        color: #dc3545;
    }


.desktop-table {
    display: block;
}

.mobile-video-list {
    display: none;
}

.mobile-video-card {
    background: #fff;
    border: 1px solid #e8ecef;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.mobile-video-thumb {
    height: 190px;
    overflow: hidden;
    background: #000;
}

    .mobile-video-thumb video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mobile-video-content {
    padding: 16px;
}

    .mobile-video-content h6 {
        font-weight: 700;
        margin-bottom: 8px;
    }

.mobile-language {
    display: inline-block;
    background: #e9f8f4;
    color: #0b7665;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 13px;
    margin-bottom: 12px;
}

.mobile-description {
    color: #6c757d;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show only 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em; /* 2 × line-height */
    word-break: break-word;
}

.mobile-date {
    border-top: 1px solid #f2f2f2;
    padding-top: 12px;
    margin-top: 12px;
}

.mobile-actions {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #f2f2f2;
}

    .mobile-actions .btn {
        flex: 1;
    }
.page-nav {
    font-size: 0.75rem;
    color: #6c757d;
}

@media (max-width: 991px) {
    .page-title {
        font-size: 1.4rem;
    }

    .btn-add-video {
        width: 100%;
        justify-content: center;
    }

/*    .table {
        min-width: 820px;
    }*/

    .desc-cell {
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .desc-cell {
        max-width: 160px;
    }
}



.text-primary-teal {
    color: #1a6fb5;
}


.form-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.25rem;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #343a40;
}

.char-limit-text {
    font-size: 0.8rem;
    color: #9ca3af;
}

.field-input {
    height: 48px;
    border-radius: 8px;
    border-color: #dee2e6;
    font-size: 0.9rem;
    color: #495057;
    background: #fff;
}

textarea.field-input {
    height: auto;
    resize: vertical;
}

.field-input::placeholder {
    color: #adb5bd;
}

.field-input:focus {
    border-color: #0b7665;
    box-shadow: 0 0 0 3px rgba(11,118,101,0.08);
}

.s3-input-group .input-group-text.s3-icon-wrap {
    background: #fff3f3;
    border-right: 0;
    border-color: #dee2e6;
    border-radius: 8px 0 0 8px;
    padding: 0 12px;
}

.s3-input-group .field-input {
    border-left: 0;
    border-radius: 0 8px 8px 0;
}

.s3-input-group:focus-within .s3-icon-wrap {
    border-color: #0b7665;
}

/* Invalid S3 state */
.is-invalid-custom {
    border-color: #dc3545 !important;
}

    .is-invalid-custom:focus {
        box-shadow: 0 0 0 3px rgba(220,53,69,0.1) !important;
    }

.btn-cancel {
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #343a40;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: background 0.15s;
}

    .btn-cancel:hover {
        background: #f8f9fa;
        color: #1a1a1a;
    }

.btn-save {
    background: #0b7665;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.18s;
}

    .btn-save:hover,
    .btn-save:focus {
        background: #095e51;
        color: #fff;
    }

@media (max-width: 768px) {
    .page-title {
        font-size: 1.3rem;
    }

    .btn-cancel,
    .btn-save {
        width: 100%;
        justify-content: center;
    }

    .d-flex.justify-content-end {
        flex-direction: column-reverse;
    }
    .desktop-table {
        display: none;
    }

    .mobile-video-list {
        display: block;
    }
    .search-card .card-body {
        padding: 16px;
    }

    .search-input-group {
        margin-bottom: 12px;
    }

    .lang-select {
        min-width: 0;
        width: 100%;
    }

    .btn-filter {
        width: 100%;
        height: 44px;
    }
}

.video-thumbnail {
    position: relative;
    width: 120px;
    height: 70px;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    cursor: pointer;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,.25);
    transition: .25s;
}
/* =============================================
   Action Buttons
============================================= */

.icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
    padding: 0;
}

    .icon-btn i {
        font-size: 15px;
    }

/* Edit */

.edit-btn {
    color: #0d6efd;
}

    .edit-btn:hover {
        background: #eaf3ff;
        border-color: #0d6efd;
        color: #0d6efd;
        transform: translateY(-1px);
    }

/* Delete */

.delete-btn {
    color: #dc3545;
}

    .delete-btn:hover {
        background: #fff2f3;
        border-color: #dc3545;
        color: #dc3545;
        transform: translateY(-1px);
    }

.icon-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}


/* =============================================
   Search Bar Card
============================================= */
.search-bar-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}

/* Search input group */
.search-group .input-group-text {
    background: #fff;
    border-right: 0;
    border-color: #dee2e6;
    border-radius: 8px 0 0 8px;
    color: #adb5bd;
}

.search-group .form-control {
    border-left: 0;
    border-color: #dee2e6;
    border-radius: 0 8px 8px 0;
    height: 46px;
    font-size: 0.92rem;
}

    .search-group .form-control::placeholder {
        color: #adb5bd;
    }

    .search-group:focus-within .input-group-text,
    .search-group .form-control:focus {
        border-color: #0b7665;
        box-shadow: none;
    }

/* Language select */
/*.lang-select {
    height: 46px;
    border-radius: 8px;
    border-color: #dee2e6;
    font-size: 0.92rem;
}*/

    .lang-select:focus {
        border-color: #0b7665;
        box-shadow: none;
    }

/* Filter button */
.btn-filter {
    height: 46px;
    background: #0b7665;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

    .btn-filter:hover {
        background: #095e51;
        color: #fff;
    }

/* =============================================
   Video Card
============================================= */
.video-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    transition: box-shadow 0.2s, transform 0.2s;
}

    .video-card:hover {
        box-shadow: 0 6px 24px rgba(0,0,0,.1);
        transform: translateY(-2px);
    }

/* =============================================
   Thumbnail
============================================= */
.video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.video-thumb-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play overlay */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.18);
    transition: background 0.2s;
}

.video-card:hover .play-overlay {
    background: rgba(0,0,0,.3);
}

.play-btn-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(11,118,101,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    padding-left: 3px; /* optical centering for play icon */
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
    transition: transform 0.15s, background 0.15s;
}

.video-card:hover .play-btn-circle {
    transform: scale(1.1);
    background: #0b7665;
}

/* Duration badge */
.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* =============================================
   Card Body
============================================= */
.lang-pill {
    display: inline-block;
    background: #eef6f4;
    color: #0b7665;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    align-self: flex-start;
}

.video-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-desc {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.55;
    /* clamp to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* =============================================
   Watch Button
============================================= */
.btn-watch {
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #0b7665;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

    .btn-watch:hover {
        background: #0b7665;
        border-color: #0b7665;
        color: #fff;
    }

/* =============================================
   Responsive tweaks
============================================= */
@media (max-width: 575px) {
    .play-btn-circle {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }

    .video-title {
        font-size: 0.95rem;
    }
}

.language-select {
    width: 100%;
    height: 48px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
    font-size: .92rem;
    color: #495057;
    font-weight: 400;
    padding-left: 14px;
    padding-right: 42px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}

    .language-select:focus {
        border-color: #0b7665;
        box-shadow: 0 0 0 3px rgba(11,118,101,.08);
    }

    .language-select option {
        color: #343a40;
    }

.btn-delete-mobile {
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    color: #dc3545;
}

    .btn-delete-mobile:hover {
        background: #dc3545;
        color: #fff;
        border-color: #dc3545;
    }

.filter-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.search-wrapper {
    flex: 1 1 auto;
    min-width: 250px;
    transition: .25s;
}

.language-wrapper {
    width: 240px;
    flex-shrink: 0;
}
.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #7b8794;
    margin-bottom: 8px;
}

#filterBtnWrapper {
    width: 58px;
    flex-shrink: 0;
}

#btnFilter {
    width: 58px;
    height: 40px;
    border-radius: 8px;
}

@media(max-width:767px) {

    .filter-toolbar {
        flex-direction: column;
        gap: 15px;
    }

    .search-wrapper,
    .language-wrapper,
    #filterBtnWrapper {
        width: 100%;
    }

    #btnFilter {
        width: 100%;
    }
}


/*Video Modal*/

.video-modal {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
}

    .video-modal .modal-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

#videoPlayer {
    width: 100%;
    max-height: 55vh;
    background: #000;
    border-radius: 10px;
    flex-shrink: 0;
}


.video-description {
    overflow-y: auto;
    max-height: 180px;
    margin-top: 10px;
    padding-right: 10px;
}

.video-description::-webkit-scrollbar{

    width:7px;

}

.video-description::-webkit-scrollbar-thumb{

    background:#cfcfcf;
    border-radius:20px;

}

.modal-dialog{

    margin:auto;

}
.pagination > .page-active > a, .pagination > .page-active > span, .pagination > .page-active > a:hover, .pagination > .page-active > span:hover, .pagination > .page-active > a:focus, .pagination > .page-active > span:focus {
    z-index: 3 !important;
    color: #fff !important;
    cursor: pointer !important;
    background-color: #5ba1dd !important;
    border-color: #337ab7 !important;
    padding: 8px 16px !important;
    margin: 8px;
    border-radius: 5px;
}