/**
 * Navigation Bar Styles for LCTC AI Commentary
 */

/* Main Navigation Bar Container */
.lctc-navigation-bar {
    margin: 15px 0;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Navigation Table */
.lctc-nav-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Toolbar Item Cell - ensures all items align properly */
.lctc-custom-item-cell,
.lctc-bible-search-cell {
    vertical-align: middle !important;
}

/* Toolbar Items - automatic height adjustment */
.lctc-custom-item-cell > *,
.lctc-bible-search-cell > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-height: 50px; /* Prevent oversized items */
    vertical-align: middle;
}

/* Toolbar Images - automatic sizing */
.lctc-custom-item-cell img {
    max-height: 40px;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* Toolbar Shortcode Content - automatic sizing */
.lctc-toolbar-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-height: 50px;
    overflow: hidden;
}

/* Search box in toolbar - proper alignment */
.lctc-toolbar-item input,
.lctc-toolbar-item button {
    vertical-align: middle;
    margin: 0;
    padding: 8px;
}

/* Navigation Cell */
.lctc-nav-cell {
    text-align: center;
    vertical-align: middle; /* Changed from 'top' to 'middle' for proper alignment */
    padding: 10px;
    position: relative;
    height: 60px; /* Fixed height for consistent row height */
}

/* Navigation Icon */
.lctc-nav-icon {
    display: inline-block;
    font-size: 20px;
    color: #555;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.lctc-nav-icon:hover {
    background-color: #f5f5f5;
    color: #0073aa;
}

.lctc-nav-icon.active {
    color: #0073aa;
}

/* Dropdown Container */
.lctc-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    text-align: left;
}

.lctc-nav-icon:hover + .lctc-dropdown,
.lctc-dropdown:hover {
    display: block;
}

/* Dropdown Header */
.lctc-dropdown-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.lctc-dropdown-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Dropdown Content */
.lctc-dropdown-content {
    padding: 10px 15px;
    max-height: 400px;
    overflow-y: auto;
}

/* History List */
.lctc-history-list,
.lctc-bookmark-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lctc-history-item,
.lctc-bookmark-item {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.lctc-history-item:last-child,
.lctc-bookmark-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.lctc-history-item a,
.lctc-bookmark-item a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 5px 0;
}

.lctc-history-item a:hover,
.lctc-bookmark-item a:hover {
    color: #0073aa;
}

.lctc-history-reference,
.lctc-bookmark-reference {
    display: block;
    font-weight: 600;
}

.lctc-history-time,
.lctc-bookmark-time {
    display: block;
    font-size: 12px;
    color: #666;
}

/* View All Container */
.lctc-view-all-container {
    text-align: center;
    padding: 10px 0 5px;
    border-top: 1px solid #eee;
    margin-top: 5px;
}

.lctc-view-all-history,
.lctc-view-all-bookmarks {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.lctc-view-all-history:hover,
.lctc-view-all-bookmarks:hover {
    text-decoration: underline;
}

/* Bookmark Delete Button */
.lctc-bookmark-delete {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3232;
    cursor: pointer;
    padding: 5px;
    font-size: 12px;
}

.lctc-bookmark-delete:hover {
    color: #b32424;
}

/* Language Search */
.lctc-language-search {
    margin-bottom: 10px;
}

.lctc-language-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Language List */
.lctc-language-list {
    max-height: 300px;
    overflow-y: auto;
}

.lctc-language-item {
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
}

.lctc-language-item:hover {
    background-color: #f5f5f5;
}

.lctc-flag-icon {
    margin-right: 8px;
}

/* Translation Result */
.lctc-translation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.lctc-translation-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* No Items Messages */
.lctc-no-history,
.lctc-no-bookmarks,
.lctc-login-required {
    padding: 15px;
    text-align: center;
    color: #666;
}

/* Responsive Adjustments */
@media screen and (max-width: 600px) {
    .lctc-dropdown {
        width: 280px;
    }
    
    .lctc-nav-icon {
        font-size: 18px;
        padding: 6px;
    }
    
    .lctc-dropdown-header h4 {
        font-size: 14px;
    }
}
