/* list-sheet.css — styles shared by the bookmark/word list bottom sheet
   on index.html and cards.html. Loaded BEFORE each page's inline <style>,
   so page-specific overrides there still win. */

.modal-overlay.active {
            opacity: 1;
            pointer-events: all;

}

.modal-overlay.active .modal-content {
            bottom: 0;

}

.modal-header h2 {
            font-size: 1.2rem;
            color: #1d1d1f;

}

.close-btn {
            background: #e5e5ea;
            border: none;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            font-size: 1.2rem;
            color: #1d1d1f;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;

}

.search-wrapper {
            padding: 12px 15px;
            background: #ffffff;
            border-bottom: 1px solid #e5e5ea;

}

.search-container {
            position: relative;
            display: flex;
            align-items: center;
            gap: 8px;

}

.sort-btn {
            flex-shrink: 0;
            height: 38px;
            min-width: 38px;
            padding: 0 10px;
            border: none;
            background: #e5e5ea;
            border-radius: 10px;
            color: #86868b;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            transition: all 0.2s ease;
            -webkit-tap-highlight-color: transparent;
            user-select: none;

}

.sort-btn:active {
            transform: scale(0.94);
            background: #d2d2d7;

}

.search-input {
            width: 100%;
            padding: 10px 12px 10px 38px;
            border: none;
            background: #e5e5ea;
            border-radius: 10px;
            font-size: 0.95rem;
            outline: none;
            color: #1d1d1f;

}

.search-input::placeholder {
            color: #86868b;

}

.bookmark-card.swiping {
            transition: none; /* Follow the finger instantly while dragging */

}

.bookmark-lang {
            font-size: 0.75rem;
            color: #86868b;
            text-transform: uppercase;
            font-weight: 600;
            margin-bottom: 4px;

}

.bookmark-divider {
            height: 1px;
            background: #e5e5ea;
            margin: 8px 0;

}

.bookmark-edit-field:focus {
            background: #eef4f1;

}

.done-edit-btn {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 34px;
            height: 34px;
            background: #2f6d53;
            color: #ffffff;
            border: none;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            z-index: 2;
            -webkit-tap-highlight-color: transparent;

}

.done-edit-btn:active {
            background: #224f3d;
            transform: scale(0.95);

}

.sheet-option {
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-align: left;
            color: #1d1d1f;

}

.sheet-option .sheet-check {
            color: #2f6d53;
            font-weight: 700;
            min-width: 20px;
            text-align: right;

}

.empty-state {
            text-align: center;
            color: #86868b;
            margin-top: 40px;
            font-size: 1rem;

}

.lang-sheet {
            position: absolute;
            bottom: -100%;
            left: 0;
            width: 100%;
            background: #ffffff;
            border-radius: 20px 20px 0 0;
            transition: bottom 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.05);
            display: flex;
            flex-direction: column;
            box-shadow: 0 -5px 15px rgba(0,0,0,0.15);
            overflow: hidden;
            padding-bottom: env(safe-area-inset-bottom, 20px);
            z-index: 110;

}

.modal-overlay.active .lang-sheet {
            bottom: 0;

}

.lang-sheet-header {
            padding: 16px;
            text-align: center;
            font-size: 0.85rem;
            color: #86868b;
            font-weight: 600;
            border-bottom: 1px solid #e5e5ea;
            text-transform: uppercase;
            letter-spacing: 0.5px;

}

.lang-sheet-btn {
            background: none;
            border: none;
            padding: 16px;
            font-size: 1.1rem;
            color: #2f6d53;
            cursor: pointer;
            text-align: center;
            border-bottom: 1px solid #f5f5f7;
            width: 100%;
            -webkit-tap-highlight-color: transparent;

}

.lang-sheet-btn:active {
            background: #f5f5f7;

}

.lang-sheet-cancel:active {
            background: #f5f5f7;

}

/* While a card is being edited on mobile, expand the list to full
   screen so the keyboard leaves comfortable room to write. */
@media (max-width: 768px) {
    .modal-content.editing-fullscreen {
        height: 100dvh;
        border-radius: 0;
    }
    .modal-content.editing-fullscreen .modal-header {
        border-radius: 0;
    }
}
