/**
 * Navigation buttons styles
 *
 * @package AI_Editor_Post_Switcher
 */

.ai-editor-nav-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background-color: #f0f0f0;
    border-radius: 6px;
    margin-right: 10px;
}

.ai-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007CBA;
    color: white;
    padding: 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
}

.ai-nav-button svg {
    width: 16px;
    height: 16px;
    display: block;
    color: white; /* SVG inherits this color */
    fill: currentColor;
}

.ai-nav-button:hover:not(:disabled) {
    background-color: #0071a8;
}

.ai-nav-button:focus {
    outline: none;
    box-shadow: 0 0 0 1px white, 0 0 0 2px #007CBA;
}

.ai-nav-button.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search button specific styles */
.ai-search-button {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #333;
    border: 3px solid #007CBA;
}

.ai-search-button:hover:not(:disabled) {
    background-color: rgba(0, 124, 186, 0.1);
}

/* Popup styles */
.ai-posts-search-popup {
    position: absolute;
    display: none;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-width: 90vw;
    max-height: 70vh;
    z-index: 100000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ai-popup-header {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #e2e4e7;
    background: #f8f9f9;
}

.ai-popup-search-input {
    flex: 1;
    border: 1px solid #8d96a0;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
}

.ai-popup-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.ai-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    margin-left: 5px;
    color: #555;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-popup-close:hover {
    background: #f0f0f0;
    color: #000;
}

.ai-popup-content {
    overflow-y: auto;
    max-height: calc(70vh - 55px);
    padding: 0;
}

.ai-popup-loading, 
.ai-popup-error,
.ai-popup-no-posts,
.ai-popup-no-results {
    padding: 20px;
    text-align: center;
    color: #555;
}

.ai-popup-error {
    color: #d94f4f;
}

.ai-popup-posts-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ai-popup-post-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
    margin: 0;
    position: relative;
}

.ai-popup-post-item:last-child {
    border-bottom: none;
}

.ai-popup-post-item a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #2c3338;
    transition: background 0.1s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-popup-post-item a:hover {
    background-color: #007CBA;
    color: white;
}

.ai-popup-current-post {
    background-color: #f0f7fc;
}

.ai-popup-current-post a {
    font-weight: 600;
    color: #007cba;
}

.ai-popup-current-post a:hover {
    color: white;
}

.ai-popup-post-status {
    font-size: 10px;
    border-radius: 3px;
    padding: 2px 5px;
    margin-right: 6px;
    text-transform: uppercase;
    color: white;
    float: right;
    margin-top: 10px;
    margin-right: 10px;
    cursor: pointer;
}

.ai-popup-post-status:hover {
    opacity: 0.85;
}

.ai-status-publish {
    background-color: #46b450;
}

.ai-status-draft {
    background-color: #c44;
}

.ai-status-pending {
    background-color: #ca4a1f;
}

.ai-status-future {
    background-color: #007eb3;
}

.ai-status-private {
    background-color: #667;
}

.ai-status-active-filter {
    box-shadow: 0 0 0 2px white, 0 0 0 3px #000;
}

.ai-popup-status-filters {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 5px;
    border-bottom: 1px solid #e2e4e7;
    background: #f0f0f0;
}

.ai-popup-status-filter {
    font-size: 10px;
    border-radius: 3px;
    padding: 3px 6px;
    margin: 0;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
    border: none;
}

.ai-popup-status-filter.active {
    box-shadow: 0 0 0 2px white, 0 0 0 3px #000;
}

.ai-popup-status-filter-all {
    background-color: #555;
}

/* Responsive adjustments */
@media (max-width: 782px) {
    .ai-editor-nav-buttons {
        margin-right: 5px;
    }
    
    .ai-nav-button {
        padding: 8px;
        width: 32px;
        height: 32px;
    }
    
    .ai-nav-button svg {
        width: 18px;
        height: 18px;
    }
    
    .ai-posts-search-popup {
        width: 280px;
    }
    
    .ai-popup-post-item a {
        padding: 12px 15px;
    }
}