﻿/*
 * File: assets/css/admin.css
 * Version: 6.9.12 (Compact Toolbar & Static Search - No Icon)
 */

/* ==========================================================================
   Big King Media Compact Toolbar
   ========================================================================== */
.tbfbkm-compact-toolbar {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 10px 15px;
    gap: 10px;
    height: 60px; /* Fixed height header */
    box-sizing: border-box;
    z-index: 100;
}

/* Site Selector */
.tbfbkm-site-select-wrap select {
    max-width: 150px;
    height: 32px;
    font-size: 13px;
    border-color: #8c8f94;
    color: #2c3338;
}

/* Scrollable Tools Container */
.tbfbkm-tools-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto; /* Allow scrolling on small screens */
    flex: 1;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE */
    padding-right: 10px;
}
.tbfbkm-tools-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome */
}

/* Vertical Divider */
.tbfbkm-divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 4px;
}

/* Tool Buttons (Icons) */
.tbfbkm-tool-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #50575e;
    cursor: pointer;
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* For tooltip */
    transition: all 0.2s;
}

.tbfbkm-tool-btn:hover {
    background: #f0f0f1;
    color: #1d2327;
    border-color: #8c8f94;
}

.tbfbkm-tool-btn:focus {
    box-shadow: 0 0 0 1px #2271b1;
    outline: 1px solid transparent;
}

.tbfbkm-tool-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.tbfbkm-tool-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
}

/* Tooltip on Hover */
.tbfbkm-tool-btn:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1d2327;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 999;
    pointer-events: none;
    opacity: 0.9;
}

/* Compact Static Search (No Icon) */
.tbfbkm-search-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    width: 120px; /* Small width just big enough for text */
    height: 32px;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

.tbfbkm-search-input {
    border: none;
    background: transparent;
    box-shadow: none;
    padding-left: 8px; /* Adjusted: Removed 28px left padding since icon is gone */
    padding-right: 8px;
    width: 100%;
    height: 30px;
    font-size: 13px;
    margin: 0;
}

.tbfbkm-search-input:focus {
    box-shadow: none;
    outline: none;
}

/* Status Text */
.tbfbkm-status {
    font-weight: 600;
    color: #d63638;
    margin-left: auto;
    font-size: 12px;
    white-space: nowrap;
}

/* ==========================================================================
   Existing Visual Enhancements
   ========================================================================== */

/* Portrait Image Fix - Ensure images maintain aspect ratio */
.tbfbkm-view .attachment-preview .thumbnail .centered.tbf-portrait-fix img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    background: #f0f0f1;
}

/* Audio & Video Native Icon Styling */
.tbfbkm-view .attachment-preview .thumbnail .centered.tbf-audio-icon-wrap,
.tbfbkm-view .attachment-preview .thumbnail .centered.tbf-video-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
    width: 100%;
    height: 100%;
}

.tbfbkm-view .attachment-preview .thumbnail .centered .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #646970;
}

/* Ensure filenames are visible at the bottom of the thumbnail */
.tbfbkm-view .attachment-preview .filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    border-top: 1px solid #ddd;
    z-index: 1; 
    transition: opacity 0.2s;
}

/* Toggle Logic: Hide Filename when class active */
.tbfbkm-view.hide-captions .attachment-preview .filename {
    display: none !important;
}

/* Adjust the checkmark position */
.tbfbkm-view .attachment-preview .check {
    z-index: 10;
}

/* Specific styling for audio/video types */
.tbfbkm-view .attachment-preview.type-audio .filename,
.tbfbkm-view .attachment-preview.type-video .filename {
    background: #fff;
}
