/* User Guide Styling */
.guide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.guide-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.guide-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.guide-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.guide-nav {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.guide-nav h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.guide-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-nav li {
    margin-bottom: 8px;
}

.guide-nav a {
    color: #495057;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    display: block;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.guide-nav a:hover {
    background: #667eea;
    color: white;
    border-left-color: #5a6fd8;
    transform: translateX(5px);
}

.guide-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.guide-section:hover {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
}

.guide-section h2 {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
}

.guide-section h3 {
    color: #495057;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.guide-section h4 {
    color: #6c757d;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #667eea;
    padding: 25px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-card h4 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.step-list {
    counter-reset: step-counter;
    padding-left: 0;
}

.step-list li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    padding-left: 50px;
    position: relative;
    line-height: 1.6;
    list-style: none;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #17a2b8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #ffc107;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .guide-container {
        padding: 10px;
    }

    .guide-header {
        padding: 30px 15px;
    }

    .guide-header h1 {
        font-size: 2rem;
    }

    .guide-section {
        padding: 20px;
    }

    .guide-nav {
        position: static;
        margin-bottom: 20px;
    }

    .step-list li {
        padding-left: 40px;
    }

    .step-list li::before {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
}

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

/* Animation for section reveals */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon styling */
.guide-section h2 i,
.guide-section h3 i,
.guide-section h4 i {
    margin-right: 10px;
    color: #667eea;
}

/* List styling improvements */
.guide-section ul,
.guide-section ol {
    padding-left: 20px;
}

.guide-section ul li,
.guide-section ol li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Add Account Button Style for PDF Download */
.btn-add-account {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-add-account:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-add-account:active {
    transform: translateY(0);
}

.btn-add-account i {
    margin-right: 8px;
}

/* Table styling for contact information */
.guide-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.guide-section table th,
.guide-section table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.guide-section table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.guide-section table tr:hover {
    background: #f8f9fa;
}

/* Reposition the shared .back-to-top button to top-right on user guide */
#scrollTopBtn {
    top: 90px;
    bottom: auto;
}

/* Scroll Navigation Buttons */
.scroll-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-nav.show {
    opacity: 1;
    visibility: visible;
}

.scroll-nav-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.scroll-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.scroll-nav-btn:active {
    transform: scale(0.95);
}

.scroll-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Hide restricted tabs by default - will be shown by JavaScript if user has permissions */
/* .guide-nav li[data-restricted="account-management"],
.guide-nav li[data-restricted="key-management"],
.guide-nav li[data-restricted="profile"],
#account-management.guide-section,
#key-management.guide-section,
#profile.guide-section {
    display: none !important;
} */

/* Show restricted tabs when permission is granted - more specific selectors to override the hide rule */
/* .guide-nav li[data-restricted="account-management"].permission-granted,
.guide-nav li[data-restricted="key-management"].permission-granted,
.guide-nav li[data-restricted="profile"].permission-granted {
    display: list-item !important;
} */

/* #account-management.guide-section.permission-granted,
#key-management.guide-section.permission-granted,
#profile.guide-section.permission-granted {
    display: block !important;
} */

/* Print styles */
@media print {
    /* Hide UI elements when printing */
    #downloadPdfBtn,
    .guide-nav,
    .col-md-3,
    #navbar-container,
    #searchbar-container,
    .sidebar,
    .btn,
    .scroll-nav {
        display: none !important;
    }

    /* Make content full-width when printing */
    .col-md-9 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .guide-container {
        padding: 0 !important;
    }

    .guide-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .guide-header {
        background: #f8f9fa !important;
        color: #000 !important;
    }
}
