/* * Styles for Sticky TOC Widget 
 * converting Tailwind classes to standard CSS 
 */

/* Container Layout */
.stw-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .stw-container {
        flex-direction: row;
    }
}

/* Main Content Area */
.stw-content-area {
    width: 100%;
}

@media (min-width: 992px) {
    .stw-content-area {
        width: 66.666%; /* 2/3 width */
    }
}

/* Sidebar Area */
.stw-sidebar-area {
    width: 100%;
    position: relative;
    display: none; /* Hidden on mobile by default */
}

@media (min-width: 992px) {
    .stw-sidebar-area {
        display: block;
        width: 33.333%; /* 1/3 width */
    }
}

.stw-sticky-wrapper {
    height: 100%;
    padding-top: 0.5rem;
}

#stw-sticky-sidebar {
    width: 300px; /* Fixed width for the sticky element */
    transition: all 0.3s ease;
}

/* Author Card */
.stw-author-card {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
}

.stw-author-img {
    width: 5rem; /* 20 * 0.25rem */
    height: 5rem;
    border-radius: 1rem;
    object-fit: cover;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.stw-author-info {
    margin-left: 1rem;
    display: flex;
    flex-direction: column;
}

.stw-author-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.stw-author-job {
    font-size: 0.875rem;
    color: #6b7280;
}

/* TOC Styles */
.stw-toc-title {
    color: #111827;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    margin-top: 0;
}

.stw-toc-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.stw-toc-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    border-radius: 0 4px 4px 0;
}

.stw-toc-item a {
    display: block;
    padding: 6px 16px;
    color: #6b7280;
    text-decoration: none !important;
    font-size: 0.95rem;
    transition: all 0.2s;
    line-height: 1.4;
    box-shadow: none !important;
}

.stw-toc-item:hover a {
    color: #2563eb;
}

/* Active State */
.stw-toc-item.active {
    border-left-color: #2563eb;
    background-color: #eff6ff;
}

.stw-toc-item.active a {
    color: #1e40af;
    font-weight: 600;
}

/* Progress Bar */
.stw-progress-track {
    position: relative;
    height: 4px;
    background: #e5e7eb;
    margin-top: 1.5rem;
    border-radius: 2px;
    overflow: hidden;
}

.stw-progress-knob {
    position: absolute;
    height: 100%;
    background: #2563eb;
    width: 0%;
    transition: width 0.1s linear;
}

/* Read Time */
.stw-read-time-wrapper {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 1.5rem;
}

.stw-read-time-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin: 0;
}

/* Share Buttons */
.stw-share-wrapper {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stw-share-title {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.stw-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.stw-btn {
    padding: 0.5rem;
    background-color: #f3f4f6;
    border-radius: 9999px; /* Pill */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
}

.stw-btn:hover {
    background-color: #dbeafe;
    color: #2563eb;
}

.stw-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Stop Element (Invisible marker) */
#stw-stop-element {
    width: 100%;
    height: 1px;
    margin-top: 50px;
    clear: both;
}