/**
 * Fluent15 Vocabulary Manager
 * Version: 3.3.6
 * Description: Styles for vocabulary management
 * Author: Fluent15
 */

/* Vocabulary Word Styles */
.f15-vocab-word {
    cursor: pointer;
    border-bottom: 2px dashed #4a90d9;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
    position: relative;
}

.f15-vocab-word:hover {
    background: #e8f0fe;
    border-bottom-color: #2b6cb0;
}

.f15-vocab-word.f15-saved {
    border-bottom-color: #48bb78;
    background: #f0fff4;
}

.f15-vocab-word.f15-saved::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 10px;
    color: #48bb78;
    background: white;
    border-radius: 50%;
    padding: 1px 3px;
    border: 1px solid #48bb78;
}

/* Popup Styles */
.f15-word-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    min-width: 280px;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: f15-popup-in 0.2s ease;
}

@keyframes f15-popup-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.f15-popup-content {
    padding: 20px;
    position: relative;
}

.f15-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.f15-popup-close:hover {
    color: #333;
}

.f15-popup-word {
    margin-bottom: 10px;
}

.f15-popup-hanzi {
    font-size: 28px;
    font-weight: bold;
    color: #2d3748;
    margin-right: 12px;
}

.f15-popup-pinyin {
    font-size: 18px;
    color: #718096;
}

.f15-popup-meaning {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.f15-popup-actions {
    margin-top: 15px;
}

.f15-popup-add {
    background: #4a90d9;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
}

.f15-popup-add:hover {
    background: #2b6cb0;
}

.f15-popup-add:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.f15-popup-added {
    display: inline-block;
    padding: 10px 20px;
    background: #f0fff4;
    color: #48bb78;
    border-radius: 6px;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

.f15-popup-remove {
    background: #fc8181;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.f15-popup-remove:hover {
    background: #e53e3e;
}

.f15-popup-login {
    color: #4a90d9;
    text-decoration: none;
    font-weight: 600;
}

.f15-popup-login:hover {
    text-decoration: underline;
}

.f15-popup-context {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.6;
}

.f15-popup-context span {
    display: block;
    margin-bottom: 4px;
}

.f15-popup-topic {
    font-weight: 600;
    color: #4a90d9;
}

.f15-popup-lesson {
    font-weight: 600;
    color: #48bb78;
}

.f15-popup-slug {
    font-weight: 600;
    color: #9f7aea;
}

.f15-popup-sentence {
    font-style: italic;
    color: #718096;
}

/* My Vocabulary Page */
#my-vocabulary-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.f15-vocabulary-header {
    margin-bottom: 30px;
}

.f15-vocabulary-header h2 {
    font-size: 28px;
    color: #2d3748;
    margin-bottom: 15px;
}

.f15-vocabulary-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.f15-filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#f15-search-vocab {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

/* Vocabulary Table */
.f15-vocabulary-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.f15-vocabulary-table {
    width: 100%;
    border-collapse: collapse;
}

.f15-vocabulary-table thead {
    background: #f7fafc;
}

.f15-vocabulary-table th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.f15-vocabulary-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f7fafc;
    vertical-align: middle;
}

.f15-vocabulary-table tr:hover {
    background: #f7fafc;
}

.f15-word-cell {
    font-weight: 600;
    color: #2d3748;
    font-size: 18px;
}

.f15-pinyin-cell {
    color: #718096;
}

.f15-meaning-cell {
    color: #2d3748;
}

.f15-topic-cell {
    color: #4a90d9;
    font-weight: 500;
}

.f15-lesson-cell {
    color: #48bb78;
    font-weight: 500;
}

.f15-actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.f15-remove-btn {
    background: none;
    border: none;
    color: #fc8181;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s ease;
}

.f15-remove-btn:hover {
    color: #e53e3e;
}

.f15-vocabulary-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.f15-export-btn {
    padding: 8px 16px;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.f15-export-btn:hover {
    background: #2d3748;
}

.f15-export-anki {
    background: #4a90d9;
    color: white;
}

.f15-export-anki:hover {
    background: #2b6cb0;
}

.f15-loading,
.f15-empty-state,
.f15-error {
    padding: 40px 20px;
    text-align: center;
    color: #718096;
}

.f15-empty-hint {
    color: #a0aec0;
    font-size: 14px;
    margin-top: 8px;
}

.f15-error {
    color: #fc8181;
}

/* Bulk Actions */
.f15-bulk-actions {
    padding: 12px 15px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.f15-bulk-actions button {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.f15-bulk-actions button:hover {
    background: #edf2f7;
}

.f15-bulk-delete-selected {
    color: #fc8181;
    border-color: #fc8181 !important;
}

.f15-bulk-delete-selected:hover {
    background: #fff5f5 !important;
}

/* Import Instructions */
.f15-import-instructions {
    margin-top: 20px;
    padding: 15px 20px;
    background: #f7fafc;
    border-radius: 5px;
    border-left: 4px solid #4a90d9;
}

.f15-import-instructions ol {
    margin: 10px 0 0 20px;
    padding: 0;
}

.f15-import-instructions li {
    padding: 3px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .f15-vocabulary-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .f15-filter-controls {
        flex-direction: column;
    }
    
    .f15-vocabulary-table {
        font-size: 14px;
    }
    
    .f15-vocabulary-table th,
    .f15-vocabulary-table td {
        padding: 8px 10px;
    }
    
    .f15-word-popup {
        max-width: 90vw;
        min-width: 200px;
    }
    
    .f15-popup-hanzi {
        font-size: 22px;
    }
    
    .f15-actions-cell {
        flex-wrap: wrap;
    }
    
    .f15-bulk-actions {
        flex-direction: column;
    }
}