﻿/* Formatting sidebar */
.format-sidebar {
    position: fixed;
    top: 96px;
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    transition: transform 0.25s ease;
}

    .format-sidebar.collapsed {
        transform: translateX(100%);
    }

.format-reopen {
    position: fixed;
    top: 96px;
    right: 0;
    z-index: 50;
    width: 26px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #475569;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

    .format-reopen:hover {
        background: #f1f5f9;
        color: #111827;
    }

    .format-reopen[hidden] {
        display: none;
    }

.format-rail {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.format-rail-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

    .format-rail-btn:hover {
        background: #f1f5f9;
        color: #111827;
    }

    .format-rail-btn.active {
        background: #eef2ff;
        color: #4f46e5;
    }

.format-panel {
    width: 240px;
    margin-right: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 12px;
}

    .format-panel[hidden] {
        display: none;
    }

/* Download menu (opens to the left of the rail) */
.format-rail-menu-anchor {
    position: relative;
}

.format-rail-menu {
    position: absolute;
    top: 0;
    right: calc(100% + 12px);
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 12px;
}

    .format-rail-menu[hidden] {
        display: none;
    }

.format-rail-menu-item {
    width: 100%;
    text-align: left;
    padding: 6px 8px;
    font-size: 13px;
    color: #374151;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

    .format-rail-menu-item:hover {
        background: #f1f5f9;
        color: #111827;
    }

/* Theme display utilities (flex, kt-alert) would otherwise override the hidden attribute */
#publishModal [hidden] {
    display: none !important;
}

.format-menu-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.format-hint {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.format-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
}

    .format-row label {
        font-size: 13px;
        color: #374151;
    }

    .format-row input[type="color"] {
        width: 40px;
        height: 28px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        background: #fff;
        cursor: pointer;
        padding: 0;
    }

        .format-row input[type="color"]:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
