/* Стили для плагина File Download Block */

/* Основной контейнер блока файла */
.wp-block-file,
.fdb-download-block {
    background: #fff;
}

.wp-block-file:hover,
.fdb-download-block:hover {
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05);
}

.fdb-download-block {
    --fdb-button-bg: #007cba;
    --fdb-button-text: #ffffff;
    --fdb-tooltip-bg: #333333;
    --fdb-tooltip-text: #ffffff;
    display: flex;
    align-items: center;
    max-width: 100%;
    gap: 10px;
}

.fdb-download-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.fdb-download-main {
    min-width: 0;
}

.fdb-download-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Стили для блока файла */
.wp-block-file a,
.fdb-download-block a {
    text-decoration: none;
    color: #333;
}

.wp-block-file a:hover,
.fdb-download-block a:hover {
    color: #007cba;
}

/* Кнопка скачивания - базовые стили без цветов */
.wp-block-file__button,
.fdb-download-button {
    border: none !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
}

.fdb-download-button {
    background: var(--fdb-button-bg) !important;
    color: var(--fdb-button-text) !important;
}

.fdb-file-size {
    font-size: 0.8em;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .wp-block-file,
    .fdb-download-block,
    .fdb-download-content {
        flex-wrap: wrap !important;
        align-items: center !important;
    }

    .fdb-download-content {
        gap: 0 !important;
    }

    .wp-block-file__button,
    .fdb-download-button {
        margin-top: 10px;
        align-self: flex-start;
    }
}

/* Иконки файлов */
.wp-block-file img,
.fdb-file-type-icon {
    max-width: 40px;
    height: auto;
    border-radius: 2px;
}

.fdb-file-type-icon {
    width: 40px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Tooltip стили - базовые без цветов */
.su-tooltip-button,
.fdb-tooltip-button {
    cursor: help;
    margin: 0 2px;
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

.su-tooltip-button img,
.fdb-info-icon-image {
    width: 40px !important;
    margin-left: 5px;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.su-tooltip-button:hover img,
.fdb-tooltip-button:hover img {
    opacity: 1;
}

.fdb-info-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 5px;
    border-radius: 50%;
    background: #666;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.su-tooltip,
.fdb-tooltip {
    position: fixed;
    padding: 10px 14px;
    background: var(--fdb-tooltip-bg);
    color: var(--fdb-tooltip-text);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 300px;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    word-wrap: break-word;
    display: none;
}

.su-tooltip.show,
.fdb-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}