/* ==============================
   Video Manual Styles
   ============================== */

/* Icon - Swiper Play */
.svg-icon.ico-swiper-play {
    background: url("/static/mrb_gis/img/component/icon/ico_swiper_play.svg") no-repeat center;
    background-size: contain;
    display: inline-block;
}

/* Modal Title Override */
#videoManualModal .modal-title,
#recipeDetailModal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    padding: unset;
    display: inline-block;
}

#videoManualModal .modal-tit {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    padding: unset;
    display: inline-block;
}

/* Arrow Left Icon */
.svg-icon.ico-arrow-left {
    background: url("/static/mrb_gis/images/common/ico/arrow-bt.svg") no-repeat center;
    background-size: contain;
    display: inline-block;
    width: 1.6rem;
    height: 1.6rem;
    transform: rotate(90deg);
}

#videoManualModal .svg-icon.ico-arrow-left {
    background: url("/static/mrb_gis/images/common/ico/ico_arrow_white.svg") no-repeat center;
    transform: rotate(0deg);
}


/* ==============================
   Video Modal Pagination (Two-row)
   Matches #addressSearchPopup style
   ============================== */
#videoManualModal .krds-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px;
    margin-top: 0.8rem;
}

#videoManualModal .krds-pagination .page-navi.prev {
    order: 1;
    margin-right: 10px;
}

#videoManualModal .krds-pagination .page-navi.next {
    order: 2;
    margin-left: 10px;
}

#videoManualModal .krds-pagination .page-links {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
}

#videoManualModal .krds-pagination .page-navi.prev.disabled::before {
    background-size: 1.6rem !important;
}

#videoManualModal .krds-pagination .page-navi.next::after {
    background: url("/static/mrb_gis/images/common/ico/ico_arrow_white.svg") no-repeat center;
    transform: rotate(-180deg) !important;
    width: 16px;
    height: 16px;
}

#videoManualModal .krds-pagination .page-navi.prev::before {
    background: url("/static/mrb_gis/images/common/ico/ico_arrow_white.svg") no-repeat center;
    transform: rotate(0deg);
    width: 16px;
    height: 16px;
}

#videoManualModal .krds-pagination .page-links .page-link.active {
    background-color: var(--krds-light-color-action-primary-active);
}

#videoManualModal .krds-pagination .page-links .page-link {
    width: 3.2rem;
    height: 3.2rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

#videoManualModal .krds-pagination .page-navi,
#videoManualModal .krds-pagination .page-link {
    background-image: none;
}

/* Video Manual List Item Hover Style */
.video-manual-list-item:hover {
    background: rgba(26, 92, 255, 0.1) !important;
    border: 1px solid var(--krds-color-light-primary-40, #1a5cff) !important;
    box-shadow: 0 0 0 1px rgba(26, 92, 255, 0.3);
    border-radius: 4px;
}

/* ==============================
   Refactored Inline Styles
   ============================== */

/* Container */
.video-manual-container {
    min-height: 400px;
    padding: 0 2rem 2rem;
}

/* List View */
.video-manual-search-wrap {
    margin-bottom: 1.6rem;
}

.video-manual-search-inner {
    display: flex;
    gap: 4px;
    align-items: center;
}

.video-manual-search-input {
    flex: 1;
}

.video-manual-list {
    height: 320px;
}

/* Player View */
#videoManualPlayer {
    text-align: center;
    display: none;
}

.video-manual-back-btn-wrap {
    margin-bottom: 1rem;
    text-align: left;
}

.video-manual-video-box {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-manual-video-element {
    width: 100%;
    max-height: 500px;
    display: block;
    margin: 0 auto;
}

.video-manual-title {
    margin-top: 1.2rem;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--krds-color-light-gray-0);
    text-align: left;
}

/* List Item (JS rendered) */
.video-manual-list-item {
    cursor: pointer;
}

.video-manual-item-row {
    padding: 1.2rem;
}

.video-manual-item-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.video-manual-icon-box {
    width: 3.2rem;
    height: 3.2rem;
    background: var(--krds-color-light-primary-10);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-manual-item-title {
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--krds-light-color-text-basic-inverse);
}

/* Empty State & Loading */
.video-manual-empty-msg {
    padding: 40px 0;
}

.video-manual-empty-icon {
    margin-bottom: 8px;
    width: 24px;
    height: 24px;
    background: url('/static/mrb_gis/images/common/toolbar/tool-legend.svg') no-repeat center;
    background-size: contain;
}

.video-manual-empty-text {
    color: #666;
}

.video-manual-loading {
    text-align: center;
    padding: 2rem;
}

/* ==============================
   Category List Styles
   ============================== */
#videoManualList ul.video-category-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for 10 items */
    gap: 12px;
    padding: 4px;
}

.video-category-item {
    cursor: pointer;
    background: var(--krds-color-light-background-box-secondary);
    border-radius: 8px;
    padding: 0;
    border: 1px solid transparent;
    transition: all 0.2s;
    height: 100%;
}

.video-category-item:hover {
    background: rgba(26, 92, 255, 0.1) !important;
    border: 1px solid var(--krds-color-light-primary-40, #1a5cff) !important;
    box-shadow: 0 0 0 1px rgba(26, 92, 255, 0.3);
    border-radius: 4px;
    /* Ensure 4px here as well if needed, though usually set on base */
    transform: translateY(-2px);
    /* Keeping this nice touch unless user wants strict static */
}

.video-category-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 1rem;
    text-align: center;
    height: 100%;
}

.category-info {
    width: 100%;
}

.video-manual-item-title {
    margin: 0 0 0.5rem 0 !important;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--krds-color-light-text-basic);
    word-break: keep-all;
}

.category-count {
    display: block;
    font-size: 1.2rem;
    color: var(--krds-color-light-text-sub);
}

/* Category Icons */
.folder-icon {
    background-color: var(--krds-color-light-primary-10);
    color: var(--krds-color-light-primary-60);
    width: 4rem;
    height: 4rem;
    margin-bottom: 0.5rem;
}

.svg-icon.ico-folder {
    -webkit-mask: url("/static/mrb_gis/images/common/ico/ico-save.svg") no-repeat center;
    mask: url("/static/mrb_gis/images/common/ico/ico-save.svg") no-repeat center;
    -webkit-mask-size: 2.4rem;
    mask-size: 2.4rem;
    background-color: currentColor;
    width: 2.4rem;
    height: 2.4rem;
    display: block;
}

/* Arrow Right */
.arrow-icon .svg-icon.ico-arrow-right {
    background: url("/static/mrb_gis/images/common/ico/ico_arrow_white.svg") no-repeat center;
    /* Use arrow-bt if colored needed */
    width: 1.6rem;
    height: 1.6rem;
    transform: rotate(270deg);
    /* Assuming arrow-bt points down or similar, adjusting rotation */
    opacity: 0.5;
}

/* Back Header Item */
.video-category-back-item {
    padding: 0;
    margin-bottom: 0.8rem;
    background-color: var(--krds-color-light-background-sub);
    border-bottom: 1px solid var(--krds-color-light-line-normal);
    cursor: pointer;
    list-style: none;
    /* Ensure no bullet */
}

.video-category-back-item:hover {
    background-color: var(--krds-color-light-background-box-secondary);
}

.back-btn-inner {
    display: flex;
    align-items: center;
}

.back-btn-inner .ico-arrow-left {
    margin-right: 0.8rem;
    /* Ensure icon is visible and sized correctly */
    width: 1.6rem;
    height: 1.6rem;
}

.back-category-title {
    font-weight: 700;
    font-size: 1.4rem;
    margin-right: 0.8rem;
    color: var(--krds-color-light-text-basic);
}

.back-text {
    font-size: 1.2rem;
    color: var(--krds-color-light-text-sub);
}

/* Search Header */
.video-list-header {
    padding: 1rem;
    background-color: var(--krds-color-light-background-sub);
    font-weight: 700;
    color: var(--krds-color-light-text-basic);
    border-bottom: 1px solid var(--krds-color-light-line-normal);
    border-radius: 4px 4px 0 0;
}