/**
 * Smart Table of Contents Styles
 * Mimicking WebFX design
 */

.smart-toc-container {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.smart-toc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}


.smart-toc-shortcode .smart-toc-sidebar {
    width: 100%;
}




.smart-toc-shortcode-wrapper {
    position: relative;
}








.smart-toc-shortcode .smart-toc-container {
    margin-bottom: 0;
}

.smart-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    cursor: pointer;
    user-select: none;
}

.smart-toc-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2933;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.smart-toc-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #666;
}

.smart-toc-toggle:hover {
    background: #e9ecef;
    color: #333;
}

.smart-toc-toggle svg {
    transition: transform 0.2s ease;
}

.smart-toc-container.collapsed .smart-toc-toggle svg {
    transform: rotate(-90deg);
}

.smart-toc-nav {
    max-height: 400px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.smart-toc-container.collapsed .smart-toc-nav {
    max-height: 0;
    overflow: hidden;
}

.smart-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.smart-toc-item {
    border-bottom: 1px solid #eef1f4;
}

.smart-toc-item:last-child {
    border-bottom: none;
}

.smart-toc-link {
    display: block;
    padding: 11px 18px 11px 32px;
    text-decoration: none;
    color: #3b3f44;
    font-size: 13px;
    line-height: 1.45;
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
}

.smart-toc-link::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd1d8;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.smart-toc-link:hover,
.smart-toc-link:focus {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.08);
    text-decoration: none;
}

.smart-toc-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.smart-toc-link:hover::before,
.smart-toc-link:focus::before,
.smart-toc-link.active::before {
    background: #0d6efd;
    transform: translateY(-50%) scale(1.15);
}

.smart-toc-link.active {
    color: #0d6efd;
    font-weight: 600;
    background: rgba(13, 110, 253, 0.12);
}

.smart-toc-level-2 .smart-toc-link {
    padding-left: 32px;
    font-weight: 600;
}

.smart-toc-level-2 .smart-toc-link::before {
    left: 18px;
}

.smart-toc-level-3 .smart-toc-link {
    padding-left: 46px;
    font-size: 12.5px;
    color: #59606a;
}

.smart-toc-level-3 .smart-toc-link::before {
    left: 32px;
}

.smart-toc-level-4 .smart-toc-link {
    padding-left: 60px;
    font-size: 12px;
    color: #6a7079;
}

.smart-toc-level-4 .smart-toc-link::before {
    left: 46px;
}

.smart-toc-level-5 .smart-toc-link {
    padding-left: 72px;
    font-size: 12px;
    color: #7a8088;
}

.smart-toc-level-5 .smart-toc-link::before {
    left: 58px;
}

.smart-toc-level-6 .smart-toc-link {
    padding-left: 84px;
    font-size: 12px;
    color: #848a92;
}

.smart-toc-level-6 .smart-toc-link::before {
    left: 70px;
}

/* Smooth scrolling for anchored headings */
html {
    scroll-behavior: smooth;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .smart-toc-container {
        margin: 10px 0;
        border-radius: 6px;
    }
    
    .smart-toc-header {
        padding: 12px 15px;
    }
    
    .smart-toc-title {
        font-size: 15px;
    }
    
    .smart-toc-link {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .smart-toc-level-2 .smart-toc-link {
        padding-left: 15px;
    }
    
    .smart-toc-level-3 .smart-toc-link {
        padding-left: 25px;
    }
    
    .smart-toc-level-4 .smart-toc-link {
        padding-left: 35px;
    }
    
    .smart-toc-level-5 .smart-toc-link {
        padding-left: 45px;
    }
    
    .smart-toc-level-6 .smart-toc-link {
        padding-left: 55px;
    }
}

/* Widget-specific styles */
.widget_smart_toc_widget {
    margin-bottom: 30px;
}

.widget_smart_toc_widget .smart-toc-container {
    margin-bottom: 0;
}

.smart-toc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}


.smart-toc-shortcode .smart-toc-sidebar {
    width: 100%;
}

.smart-toc-shortcode .smart-toc-container {
    margin-bottom: 0;
}

/* Shortcode styles - for inline use */
.single .smart-toc-container {
    margin: 20px 0;
    max-width: 100%;
}

.smart-toc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}


.smart-toc-shortcode .smart-toc-sidebar {
    width: 100%;
}

.smart-toc-shortcode .smart-toc-container {
    margin-bottom: 0;
}

/* Social Sharing Section */
.smart-toc-social-section {
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 20px 32px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.smart-toc-social-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2933;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.smart-toc-social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.smart-toc-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
    color: #fff;
}

.smart-toc-social-btn svg {
    width: 18px;
    height: 18px;
}

.smart-toc-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    text-decoration: none;
}

.smart-toc-social-facebook { background: #1877f2; }
.smart-toc-social-twitter { background: #000000; }
.smart-toc-social-linkedin { background: #0a66c2; }

.smart-toc-custom-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smart-toc-custom-links a {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.smart-toc-custom-links a:hover {
    text-decoration: underline;
}

.smart-toc-social-email { background: #6c757d; }

/* Signup Section */
.smart-toc-signup-section {
    background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 20px 32px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}



.smart-toc-signup-avatar {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto;
}

.smart-toc-avatar-decorative {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.smart-toc-avatar-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.7;
}

.smart-toc-shape-1 {
    width: 34px;
    height: 34px;
    background: #38bdf8;
    top: 6px;
    left: -8px;
}

.smart-toc-shape-2 {
    width: 28px;
    height: 28px;
    background: #818cf8;
    bottom: 6px;
    right: -12px;
}

.smart-toc-shape-3 {
    width: 22px;
    height: 22px;
    background: #f97316;
    top: -6px;
    right: 18px;
}

.smart-toc-avatar-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    box-shadow: 0 12px 22px rgba(99, 102, 241, 0.3);
}

.smart-toc-avatar-initials {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
}

.smart-toc-signup-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2933;
    line-height: 1.4;
}

.smart-toc-signup-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #4a5562;
}

.smart-toc-signup-form {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}


.smart-toc-form-group {
    margin: 0;
}

.smart-toc-email-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d0d5df;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #1f2933;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.smart-toc-email-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.smart-toc-email-input::placeholder {
    color: #94a3b8;
}

.smart-toc-signup-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.smart-toc-signup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.smart-toc-signup-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.smart-toc-signup-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Messages */
.smart-toc-form-message {
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: left;
}

.smart-toc-form-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.smart-toc-form-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
}


/* Widget-specific adjustments */
.widget_smart_toc_widget .smart-toc-container,
.widget_smart_toc_widget .smart-toc-social-section,
.widget_smart_toc_widget .smart-toc-signup-section {
    border-radius: 0;
    margin-bottom: 0;
}

.widget_smart_toc_widget .smart-toc-container {
    border-bottom: none;
}
.widget_smart_toc_widget .smart-toc-social-section {
    border-bottom: none;
}

.widget_smart_toc_widget .smart-toc-signup-section:last-child {
    border-bottom: 1px solid #e1e5e9;
    border-radius: 0 0 8px 8px;
}

.widget_smart_toc_widget .smart-toc-container:first-child {
    border-radius: 8px 8px 0 0;
}

/* Mobile responsiveness for new sections */
@media (max-width: 768px) {
    .smart-toc-social-section,
    .smart-toc-signup-section {
        padding: 18px 16px;
        border-radius: 10px;
    }

    .smart-toc-social-buttons {
        gap: 8px;
    }

    .smart-toc-social-btn {
        width: 34px;
        height: 34px;
    }

    .smart-toc-signup-avatar {
        width: 72px;
        height: 72px;
        margin-bottom: 16px;
    }

    .smart-toc-avatar-circle {
        width: 52px;
        height: 52px;
        border-width: 3px;
    }

    .smart-toc-avatar-initials {
        font-size: 18px;
    }

    .smart-toc-shape-1 {
        width: 26px;
        height: 26px;
    }

    .smart-toc-shape-2 {
        width: 22px;
        height: 22px;
    }

    .smart-toc-shape-3 {
        width: 18px;
        height: 18px;
    }

    .smart-toc-signup-title {
        font-size: 14px;
    }

    .smart-toc-signup-text {
        font-size: 12.5px;
    }
}
    
    .smart-toc-social-buttons {
        gap: 12px;
    }
    
    .smart-toc-social-btn {
        width: 36px;
        height: 36px;
    }
    
    .smart-toc-signup-avatar {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .smart-toc-avatar-circle {
        width: 50px;
        height: 50px;
    }
    
    .smart-toc-avatar-initials {
        font-size: 18px;
    }
    
    .smart-toc-shape-1 {
        width: 25px;
        height: 25px;
    }
    
    .smart-toc-shape-2 {
        width: 20px;
        height: 20px;
    }
    
    .smart-toc-shape-3 {
        width: 16px;
        height: 16px;
    }
    
    .smart-toc-signup-title {
        font-size: 16px;
    }
    
    .smart-toc-signup-text {
        font-size: 13px;
    }


/* Print styles */
@media print {
    .smart-toc-container {
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .smart-toc-toggle {
        display: none;
    }
    
    .smart-toc-nav {
        max-height: none !important;
        overflow: visible !important;
    }
    
    .smart-toc-social-section,
    .smart-toc-signup-section {
        display: none;
    }
}


































