/**
 * Vertical Reader Styles
 * Continuous scroll for webtoons
 */

.kcr-vertical-reader {
    position: relative;
    width: 100%;
    background: #000;
    min-height: 100vh;
}

.kcr-scroll-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.kcr-webtoon-page {
    width: 100%;
    margin-bottom: 0;
}

.kcr-webtoon-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Favorite Tab (above comments tab) */
.kcr-favorite-tab {
    position: fixed;
    right: 0;
    top: calc(50% - 100px);
    width: 44px;
    height: 44px;
    background: rgba(100, 100, 100, 0.25);
    backdrop-filter: blur(8px);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 89;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);
}

.kcr-favorite-tab:hover {
    background: rgba(255, 107, 107, 0.3);
    width: 50px;
}

.kcr-favorite-tab .dashicons {
    font-family: dashicons !important;
    display: inline-block;
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #fff;
    transition: color 0.2s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.kcr-favorite-tab .dashicons-heart:before {
    content: "\f487";
}

.kcr-favorite-tab.favorited {
    background: rgba(255, 107, 107, 0.4);
}

.kcr-favorite-tab.favorited .dashicons {
    color: #ff6b6b;
}

.kcr-favorite-tab.favorited:hover {
    background: rgba(255, 107, 107, 0.6);
}

/* Comments Tab (disabled placeholder — above bookmark tab) */
.kcr-comments-tab {
    position: fixed;
    right: 0;
    top: calc(50% - 54px);
    width: 44px;
    height: 44px;
    background: rgba(100, 100, 100, 0.25);
    backdrop-filter: blur(8px);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 89;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.35;
    pointer-events: none;
}

.kcr-comments-tab .dashicons {
    font-family: dashicons !important;
    display: inline-block;
    font-size: 20px;
    width: 20px;
    height: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #fff;
}

.kcr-comments-tab .dashicons-admin-comments:before {
    content: "\f101";
}

/* Scrolling Bookmark Tab */
.kcr-bookmark-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 80px;
    background: rgba(0, 217, 255, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 90;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.3);
}

.kcr-bookmark-tab:hover {
    background: rgba(0, 217, 255, 0.5);
    width: 50px;
    box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.4);
}

.kcr-bookmark-tab .dashicons {
    font-family: dashicons !important;
    display: inline-block;
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}

/* bookmark icon handled by universal .dashicons.dashicons-bookmark rule in reader-base.css */

.kcr-bookmark-tab.bookmarked {
    background: rgba(255, 203, 5, 0.4);
}

.kcr-bookmark-tab.bookmarked:hover {
    background: rgba(255, 203, 5, 0.6);
}

.kcr-bookmark-tab.bookmarked .dashicons {
    color: #ffcb05;
}

.kcr-bookmark-tab.touch-active {
    background: rgba(0, 217, 255, 0.6);
    transform: translateY(-50%) scale(0.95);
}

.kcr-bookmark-tab.kcr-bookmark-hidden,
.kcr-bookmark-tab.kcr-bookmark-disabled {
    pointer-events: none;
}

.kcr-bookmark-tab.kcr-bookmark-hidden {
    opacity: 0;
}

/* Webtoon Recommendations Section */
.kcr-webtoon-recommendations {
    position: relative;
    width: 100%;
    background: #1a1a1a;
    padding: 50px 20px 30px;
    margin-top: 20px;
}

.kcr-episode-navigation {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.kcr-episode-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 217, 255, 0.9);
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 217, 255, 0.3);
}

.kcr-episode-nav-btn:hover {
    background: rgba(0, 217, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 217, 255, 0.4);
}

.kcr-episode-nav-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.kcr-webtoon-rec-header {
    text-align: center;
    margin-bottom: 20px;
}

.kcr-webtoon-rec-header h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

.kcr-webtoon-rec-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.kcr-webtoon-rec-card {
    background: #0a0e14;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.25s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.kcr-webtoon-rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.25);
}

.kcr-webtoon-rec-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.kcr-webtoon-rec-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #0a0e14;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kcr-webtoon-rec-placeholder .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #333;
}

.kcr-webtoon-rec-title {
    padding: 8px 10px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scroll Progress Indicator */
.kcr-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.kcr-scroll-progress-bar {
    height: 100%;
    background: #00d9ff;
    width: 0%;
    transition: width 0.1s;
}

/* Vertical Reader Controls */
.kcr-vertical-reader .kcr-controls-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 0;
    border-top: 1px solid #333;
    z-index: 100;
}

.kcr-scroll-position {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ccc;
    font-weight: 500;
}

.kcr-scroll-position .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.kcr-scroll-text {
    font-size: 13px;
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .kcr-webtoon-recommendations {
        padding: 45px 20px 28px;
    }

    .kcr-webtoon-rec-header {
        margin-bottom: 18px;
    }

    .kcr-webtoon-rec-header h3 {
        font-size: 1.15rem;
    }

    .kcr-webtoon-rec-grid {
        grid-template-columns: repeat(3, 1fr);  /* 3 columns on tablet */
        gap: 12px;
    }

    .kcr-episode-nav-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .kcr-webtoon-rec-title {
        font-size: 0.75rem;
        min-height: 38px;
        padding: 7px 9px;
    }
}

/* Mobile Responsive - Match horizontal reader pattern */
@media (max-width: 768px) {
    .kcr-vertical-reader {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .kcr-scroll-container {
        max-width: 100%;
        padding: 0 5px;  /* Minimal padding for edge protection */
    }

    .kcr-webtoon-page {
        margin-bottom: 0;
    }

    .kcr-webtoon-image {
        max-width: 100%;
        width: 100%;
    }

    /* Keep scroll progress visible on mobile */
    .kcr-scroll-progress {
        height: 3px;  /* Slightly thinner on mobile */
    }

    /* Mobile controls */
    .kcr-vertical-reader .kcr-controls-bar {
        padding: 6px 0;
    }

    .kcr-vertical-reader .kcr-controls-wrapper {
        padding: 0 5px;  /* Minimal padding for edge protection */
    }

    .kcr-scroll-position {
        font-size: 12px;
    }

    .kcr-scroll-position .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    .kcr-scroll-text {
        font-size: 11px;
    }

    /* Mobile bookmark tab */
    .kcr-bookmark-tab {
        width: 36px;
        height: 70px;
    }

    .kcr-bookmark-tab:hover {
        width: 40px;
    }

    .kcr-bookmark-tab .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    /* Webtoon recommendations - mobile */
    .kcr-webtoon-recommendations {
        padding: 45px 5px 25px;
        margin-top: 15px;
    }

    .kcr-episode-navigation {
        top: 10px;
        padding: 0 5px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .kcr-episode-nav-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .kcr-episode-nav-btn .nav-text {
        display: none;  /* Hide text on mobile, show only icons */
    }

    .kcr-episode-nav-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    .kcr-webtoon-rec-header {
        margin-bottom: 15px;
    }

    .kcr-webtoon-rec-header h3 {
        font-size: 1.1rem;
    }

    .kcr-webtoon-rec-grid {
        grid-template-columns: repeat(2, 1fr);  /* 2 columns on mobile */
        gap: 10px;
    }

    .kcr-webtoon-rec-title {
        font-size: 0.75rem;
        min-height: 35px;
        padding: 6px 8px;
    }

    .kcr-webtoon-rec-placeholder .dashicons {
        font-size: 30px;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .kcr-scroll-progress {
        height: 2px;  /* Even thinner on small screens */
    }
}
