/* Manual Bookmark System Styles */
:root {
    --font-headings: var(--font-family-arabic, 'Cairo', sans-serif);
    --font-content: var(--font-family-arabic, 'Cairo', sans-serif);
}

/* ========================================
   Bookmark Button Tooltip Styles
   ======================================== */

/* Remove native title tooltip */
.bookmark-dropdown-btn[title] {
    title: none;
}

/* Tooltip base for bookmark button */
.bookmark-dropdown-btn.has-tooltip {
    position: relative;
}

.bookmark-dropdown-btn.has-tooltip::before,
.bookmark-dropdown-btn.has-tooltip::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

/* Tooltip text */
.bookmark-dropdown-btn.has-tooltip::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--bg-tertiary, #333);
    color: var(--text-primary, #fff);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: var(--font-family-arabic, 'Noto Kufi Arabic', sans-serif);
    min-height: 32px;
    display: flex;
    align-items: center;
    z-index: 10020;
}

/* Tooltip arrow */
.bookmark-dropdown-btn.has-tooltip::before {
    content: '';
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-tertiary, #333);
    z-index: 10020;
}

/* Fix tooltip positioning for bookmark button at edge in LTR */
.header-actions #bookmark-header-container .bookmark-dropdown-btn.has-tooltip::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.header-actions #bookmark-header-container .bookmark-dropdown-btn.has-tooltip::before {
    left: auto;
    right: 12px;
    transform: translateX(0);
}

/* Show tooltip on hover */
.bookmark-dropdown-btn.has-tooltip:hover::before,
.bookmark-dropdown-btn.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile - hide tooltips */
@media (max-width: 768px) {

    .bookmark-dropdown-btn.has-tooltip::before,
    .bookmark-dropdown-btn.has-tooltip::after {
        display: none;
    }
}

/* ========================================
   Floating Bookmark Button
   ======================================== */

/* Floating Bookmark Button - HIDDEN (using section buttons instead) */
.floating-bookmark-btn {
    display: none !important;
}

/* Section Bookmark Button - Inline before section title */
.section-bookmark-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 2px solid var(--gold-color, #f39c12);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin-left: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

.section-bookmark-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--gold-color, #f39c12);
    transition: fill 0.2s ease;
}

.section-bookmark-btn:hover {
    background: var(--gold-color, #f39c12);
    transform: scale(1.05);
}

.section-bookmark-btn:hover svg {
    fill: white;
}

.section-bookmark-btn.bookmarked {
    background: var(--accent-color, #e74c3c);
    border-color: var(--accent-color, #e74c3c);
}

.section-bookmark-btn.bookmarked svg {
    fill: white;
}

.section-bookmark-btn.bookmarked:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Section heading with bookmark button */
.chapter-content section h2,
.chapter-content section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Ensure bookmark button doesn't break heading layout */
.chapter-content section h2 .section-bookmark-btn,
.chapter-content section h3 .section-bookmark-btn {
    order: -1;
    /* Move to start (right side in RTL) */
}

/* Header Actions Container */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#bookmark-header-container {
    display: flex;
    align-items: center;
}

/* Bookmark Dropdown - In header next to search */
.bookmark-dropdown {
    position: relative;
    z-index: 99999;
    display: inline-flex;
    align-items: center;
}

.bookmark-dropdown.hidden {
    display: none !important;
}

.bookmark-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    min-width: 40px;
    min-height: 40px;
}

.bookmark-dropdown-btn svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.bookmark-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bookmark-dropdown-btn:focus {
    outline: 2px solid var(--gold-color, #f39c12);
    outline-offset: 2px;
}

.bookmark-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    background: var(--accent-color, #e74c3c);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    position: absolute;
    top: 2px;
    right: 2px;
}

/* Hide count when zero */
.bookmark-count:empty,
.bookmark-count[data-count="0"] {
    display: none;
}

.bookmark-dropdown-menu {
    position: absolute;
    top: 107px;
    right: -245px;
    left: auto;
    width: 320px;
    max-height: calc(100vh - 127px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 99999;
}

.bookmark-dropdown.open .bookmark-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* RTL positioning */
[dir="rtl"] .bookmark-dropdown-menu,
body.rtl .bookmark-dropdown-menu {
    right: auto;
    left: -245px;
}

.bookmark-dropdown.open .bookmark-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bookmark-dropdown-header-inner {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light, #f8f9fa);
    border-radius: 12px 12px 0 0;
}

.bookmark-dropdown-header-inner h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-headings, 'Cairo', sans-serif);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sync status icon */
.sync-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sync-status-icon svg {
    width: 14px;
    height: 14px;
}

.bookmark-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bookmark-close-btn {
    background: transparent;
    border: none;
    color: var(--text-light, #7f8c8d);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    font-weight: 300;
    margin-left: 4px;
}

.bookmark-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color, #2c3e50);
}

.bookmark-export-btn,
.bookmark-import-btn,
.bookmark-clear-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.bookmark-export-btn svg,
.bookmark-import-btn svg,
.bookmark-clear-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--text-light, #7f8c8d);
}

.bookmark-export-btn:hover,
.bookmark-import-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.bookmark-export-btn:hover svg,
.bookmark-import-btn:hover svg {
    fill: var(--text-color, #2c3e50);
}

.bookmark-clear-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.bookmark-clear-btn:hover svg {
    fill: var(--accent-color);
}

.bookmark-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.bookmark-chapter-group {
    margin-bottom: 16px;
}

.bookmark-chapter-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    padding: 8px 12px;
    font-family: var(--font-headings, 'Cairo', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.bookmark-item-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
}

.bookmark-item-btn:hover {
    background: var(--bg-light, #f8f9fa);
    border-color: var(--gold-color);
    transform: translateY(-1px);
}

.bookmark-item-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--accent-color, #e74c3c);
    flex-shrink: 0;
}

.bookmark-item-content {
    flex: 1;
    min-width: 0;
}

.bookmark-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    font-family: var(--font-content, 'Noto Kufi Arabic', serif);
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.bookmark-item-date {
    font-size: 11px;
    color: var(--text-light);
    font-family: var(--font-headings, 'Cairo', sans-serif);
}

.bookmark-delete-btn {
    background: transparent;
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.bookmark-delete-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--text-light, #7f8c8d);
}

.bookmark-delete-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--text-light, #7f8c8d);
}

.bookmark-delete-btn:hover svg {
    fill: var(--accent-color);
}

.bookmark-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
}

.bookmark-empty svg {
    width: 48px;
    height: 48px;
    fill: var(--border-color);
    margin-bottom: 16px;
}

.bookmark-empty p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-family: var(--font-headings, 'Cairo', sans-serif);
}

.bookmark-empty small {
    font-size: 13px;
    color: var(--text-light);
    font-family: var(--font-content, 'Noto Kufi Arabic', serif);
}

/* Notification */
.bookmark-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-family: var(--font-headings, 'Cairo', sans-serif);
    font-size: 14px;
    border-right: 4px solid var(--accent-color);
}

/* RTL positioning - left side */
[dir="rtl"] .bookmark-notification,
body.rtl .bookmark-notification {
    right: auto;
    left: 20px;
    transform: translateX(-100%);
    border-right: none;
    border-left: 4px solid var(--accent-color);
}

[dir="rtl"] .bookmark-notification.show,
body.rtl .bookmark-notification.show {
    transform: translateX(0);
}

.bookmark-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.bookmark-notification-success {
    border-right-color: #4caf50;
}

[dir="rtl"] .bookmark-notification-success,
body.rtl .bookmark-notification-success {
    border-left-color: #4caf50;
}

.bookmark-notification-error {
    border-right-color: #f44336;
}

[dir="rtl"] .bookmark-notification-error,
body.rtl .bookmark-notification-error {
    border-left-color: #f44336;
}

.bookmark-notification-warning {
    border-right-color: #ff9800;
}

[dir="rtl"] .bookmark-notification-warning,
body.rtl .bookmark-notification-warning {
    border-left-color: #ff9800;
}

.bookmark-notification-info {
    border-right-color: #2196f3;
}

[dir="rtl"] .bookmark-notification-info,
body.rtl .bookmark-notification-info {
    border-left-color: #2196f3;
}

/* Dark Theme Support */
[data-theme="dark"] .bookmark-dropdown-menu,
[data-theme="dark"] .bookmark-item-btn {
    background: var(--bg-dark, #2c3e50);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .bookmark-dropdown-header-inner {
    background: var(--bg-color, #1a1a1a);
}

[data-theme="dark"] .bookmark-notification {
    background: var(--bg-dark, #2c3e50);
    color: var(--text-color);
}

/* Sepia Theme Support */
[data-theme="sepia"] .bookmark-dropdown-menu,
[data-theme="sepia"] .bookmark-item-btn {
    background: #f4ecd8;
    color: #5c4b37;
    border-color: #d4c8b4;
}

[data-theme="sepia"] .bookmark-dropdown-header-inner {
    background: #e8dcc8;
}

[data-theme="sepia"] .bookmark-notification {
    background: #e8dcc8;
    color: #5c4b37;
}

/* High Contrast Theme Support */
[data-theme="high-contrast"] .bookmark-dropdown-menu,
[data-theme="high-contrast"] .bookmark-item-btn {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

[data-theme="high-contrast"] .bookmark-dropdown-header-inner {
    background: #1a1a1a;
}

[data-theme="high-contrast"] .bookmark-notification {
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
}

/* Mobile bookmark badge positioning */
.mobile-action-btn {
    position: relative;
}

.mobile-action-btn .mobile-bookmark-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent-color, #e74c3c);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-action-btn .mobile-bookmark-count:empty,
.mobile-action-btn .mobile-bookmark-count[data-count="0"] {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    /* Hide desktop bookmark dropdown on mobile */
    .bookmark-dropdown-header {
        display: none !important;
    }
}

    .floating-bookmark-btn {
        right: 15px;
        bottom: 240px;
        width: 48px;
        height: 48px;
    }

    .floating-bookmark-btn:hover {
        transform: scale(1.1);
    }

    .bookmark-dropdown-btn {
        padding: 6px;
        min-width: 36px;
        min-height: 36px;
    }

    .bookmark-dropdown-btn svg {
        width: 20px;
        height: 20px;
    }
}


/* ========================================
   Custom Input & Confirm Modals
   ======================================== */

.bookmark-input-modal,
.bookmark-confirm-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.bookmark-input-modal.visible,
.bookmark-confirm-modal.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.bookmark-input-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bookmark-input-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bookmark-input-modal.visible .bookmark-input-content,
.bookmark-confirm-modal.visible .bookmark-input-content {
    transform: scale(1) translateY(0);
}

.bookmark-input-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color, #2c3e50), var(--secondary-color, #34495e));
    color: white;
    font-family: var(--font-headings, 'Cairo', sans-serif);
    font-size: 18px;
    font-weight: 600;
}

.bookmark-input-body {
    padding: 24px;
}

.bookmark-input-body label {
    display: block;
    font-family: var(--font-headings, 'Cairo', sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light, #7f8c8d);
    margin-bottom: 8px;
}

.bookmark-name-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 10px;
    font-family: var(--font-content, 'Noto Kufi Arabic', serif);
    font-size: 16px;
    color: var(--text-color, #2c3e50);
    background: var(--bg-light, #f8f9fa);
    transition: border-color 0.2s, box-shadow 0.2s;
    direction: rtl;
}

.bookmark-name-input:focus {
    outline: none;
    border-color: var(--gold-color, #f39c12);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.15);
    background: white;
}

.bookmark-confirm-body {
    padding: 24px;
    text-align: center;
}

.bookmark-confirm-body p {
    font-family: var(--font-content, 'Noto Kufi Arabic', serif);
    font-size: 16px;
    color: var(--text-color, #2c3e50);
    line-height: 1.6;
    margin: 0;
}

.bookmark-input-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: flex-end;
}

.bookmark-input-cancel,
.bookmark-input-confirm,
.bookmark-confirm-delete {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-headings, 'Cairo', sans-serif);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.bookmark-input-cancel {
    background: var(--bg-light, #f0f0f0);
    color: var(--text-color, #2c3e50);
}

.bookmark-input-cancel:hover {
    background: #e0e0e0;
}

.bookmark-input-confirm {
    background: var(--gold-color, #f39c12);
    color: white;
}

.bookmark-input-confirm:hover {
    background: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.bookmark-confirm-delete {
    background: var(--accent-color, #e74c3c);
    color: white;
}

.bookmark-confirm-delete:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Dark Theme */
[data-theme="dark"] .bookmark-input-content {
    background: var(--bg-dark, #2c3e50);
}

[data-theme="dark"] .bookmark-name-input {
    background: var(--bg-color, #1a1a1a);
    border-color: var(--border-color, #3d566e);
    color: var(--text-color, #ecf0f1);
}

[data-theme="dark"] .bookmark-name-input:focus {
    background: var(--bg-dark, #2c3e50);
}

[data-theme="dark"] .bookmark-confirm-body p {
    color: var(--text-color, #ecf0f1);
}

[data-theme="dark"] .bookmark-input-cancel {
    background: var(--bg-color, #1a1a1a);
    color: var(--text-color, #ecf0f1);
}

[data-theme="dark"] .bookmark-input-cancel:hover {
    background: #34495e;
}

/* Sepia Theme - Input Modal */
[data-theme="sepia"] .bookmark-input-content {
    background: #f4ecd8;
}

[data-theme="sepia"] .bookmark-name-input {
    background: #faf7f0;
    border-color: #d4c8b4;
    color: #5c4b37;
}

[data-theme="sepia"] .bookmark-name-input:focus {
    background: #f4ecd8;
    border-color: #8b6914;
}

[data-theme="sepia"] .bookmark-confirm-body p {
    color: #5c4b37;
}

[data-theme="sepia"] .bookmark-input-cancel {
    background: #e8dcc8;
    color: #5c4b37;
}

[data-theme="sepia"] .bookmark-input-cancel:hover {
    background: #ddd0b8;
}

/* High Contrast Theme - Input Modal */
[data-theme="high-contrast"] .bookmark-input-content {
    background: #000000;
    border: 2px solid #ffffff;
}

[data-theme="high-contrast"] .bookmark-name-input {
    background: #1a1a1a;
    border-color: #ffffff;
    color: #ffffff;
}

[data-theme="high-contrast"] .bookmark-name-input:focus {
    background: #000000;
    border-color: #00ff00;
    box-shadow: 0 0 0 4px rgba(0, 255, 0, 0.3);
}

[data-theme="high-contrast"] .bookmark-confirm-body p {
    color: #ffffff;
}

[data-theme="high-contrast"] .bookmark-input-cancel {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #ffffff;
}

[data-theme="high-contrast"] .bookmark-input-cancel:hover {
    background: #333333;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .bookmark-input-content {
        width: 95%;
        max-width: none;
        margin: 0 10px;
    }

    .bookmark-input-header {
        padding: 16px 20px;
        font-size: 16px;
    }

    .bookmark-input-body {
        padding: 20px;
    }

    .bookmark-input-actions {
        padding: 12px 20px 20px;
        flex-direction: column-reverse;
    }

    .bookmark-input-cancel,
    .bookmark-input-confirm,
    .bookmark-confirm-delete {
        width: 100%;
        padding: 14px;
    }
}


/* Mobile Bookmark Panel - Dropdown from Top Toolbar */
.mobile-bookmark-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    pointer-events: none;
}

.mobile-bookmark-panel.active {
    display: block;
    pointer-events: auto;
}

.mobile-bookmark-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
    transition: background 0.3s ease;
}

.mobile-bookmark-panel.show .mobile-bookmark-backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.mobile-bookmark-content {
    position: fixed;
    top: var(--mobile-header-height, 70px);
    left: 0;
    right: 0;
    z-index: 2;
    width: 100%;
    max-height: calc(100vh - var(--mobile-header-height, 70px));
    background: var(--bg-color, white);
    border-radius: 0 0 16px 16px;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-bookmark-panel.show .mobile-bookmark-content {
    transform: translateY(0);
}

.mobile-bookmark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light, #f8f9fa);
    flex-shrink: 0;
}

.mobile-bookmark-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-headings, 'Cairo', sans-serif);
}

.mobile-bookmark-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.mobile-bookmark-close:active {
    color: var(--text-color);
}

.mobile-bookmark-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mobile-bookmark-export-btn,
.mobile-bookmark-import-btn,
.mobile-bookmark-clear-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
}

.mobile-bookmark-export-btn svg,
.mobile-bookmark-import-btn svg,
.mobile-bookmark-clear-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.mobile-bookmark-export-btn:active,
.mobile-bookmark-import-btn:active {
    background: rgba(74, 144, 226, 0.1);
    border-color: var(--accent-color);
}

.mobile-bookmark-clear-btn:active {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--accent-color);
}

.mobile-bookmark-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.mobile-bookmark-empty {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
}

.mobile-bookmark-empty svg {
    width: 64px;
    height: 64px;
    fill: var(--border-color);
    margin-bottom: 16px;
}

.mobile-bookmark-empty p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-family: var(--font-headings, 'Cairo', sans-serif);
}

.mobile-bookmark-empty small {
    font-size: 14px;
    color: var(--text-light);
    font-family: var(--font-content, 'Noto Kufi Arabic', serif);
}

/* Dark theme support */
[data-theme="dark"] .mobile-bookmark-content {
    background: var(--bg-dark, #2c3e50);
}

[data-theme="dark"] .mobile-bookmark-header {
    background: var(--bg-color, #1a1a1a);
}

[data-theme="dark"] .mobile-bookmark-actions button {
    background: var(--bg-color, #1a1a1a);
    border-color: var(--border-color);
}
