/* Remove Site Name from page */
.site-title,
.site-header,
.entry-header {
    display: none !important;
}

/* Make the entire page match the viewport height */
html, body {
    margin: 0;
    padding: 0;
    height: auto !important;
    overflow-y: auto !important;
}

/* Remove Underscores default spacing */
.site,
.site-content,
#content {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

/* Correct two-column layout */
#wpfm-wrapper {
    display: flex !important;
    flex-direction: row !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin-left: 20px;
    margin-right: 20px;
    background: #ffffff !important;
}

/* Remove default UL indentation */
#wpfm-sidebar ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-right: 20px;
}

/* Folder tree panel */
#wpfm-sidebar {
    width: 280px !important;
    overflow-y: auto !important;
    border-right: 1px solid #ccc !important;
    padding-right: 10px !important;
}

/* File list + preview column */
#wpfm-main {
    flex: 0 0 900px !important;
    display: flex !important;
    flex-direction: column !important;
    padding-right: 20px;
    padding-left: 0px;
    max-width: 1000px !important;
}

/* File panel container */
.wpfm-file-panel {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* File list height */
.wpfm-file-list {
    height: 250px !important;
    overflow-y: auto !important;
}

/* Preview panel — FIXED BLOCK */
.wpfm-file-bottom {
    flex: 1 1 auto !important;
    max-width: 200mm !important; /* or any width you prefer */
    min-height: 150px !important;
    overflow-y: auto !important;
    border-top: 1px solid #ccc !important;
    padding-top: 10px !important;
}

/* Prevent large images from blowing out the layout */
.wpfm-file-bottom img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

.wpfm-file-row.wpfm-file-selected {
    background-color: #e6f2ff !important;
    border-left: 4px solid #0073aa !important;
}

/* Table grid */
.wpfm-table td,
.wpfm-table th {
    border: 1px solid #ccc;
    padding: 6px 8px;
    text-align: left;
}

/* Column headers */
.wpfm-table th {
    background: #f0f0f0;
    font-weight: 600;
    padding: 6px 8px;
}

/* Align Download + Delete buttons neatly in admin view */
.wpfm-table td {
    vertical-align: middle;
}

.wpfm-table td a.wpfm-download {
    display: inline-block;
    margin-right: 10px;
}

.wpfm-table td button.wpfm-delete-file {
    display: inline-block;
    margin-left: 0;
    padding: 4px 10px;
    background: #d63638;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.wpfm-table td button.wpfm-delete-file:hover {
    background: #b32f31;
}

/* File rows */
.wpfm-file-row td {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Alternating row shading */
.wpfm-table tr:nth-child(even) {
    background: #fafafa;
}

.wpfm-table tr:nth-child(odd) {
    background: #ffffff;
}

/* Folder items */
.wpfm-folder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 3px 0;
    padding: 4px 6px;

    /* existing indentation — KEEP THIS */
    /*padding-left: calc(var(--wpfm-depth, 0) * 20px); */

    /* new layout for collapsible triangle */

}

/* Triangle */
.wpfm-toggle {
    color: #0073aa;
    font-size: 16px;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

/* Rotate triangle when open */
.wpfm-toggle.open {
    transform: rotate(90deg);
}

/* Collapse children */
.wpfm-collapsed > ul {
    display: none;
}

.wpfm-folder:hover {
    background-color: #f0f0f0 !important;
}

/* Selected folder */
.wpfm-folder.selected {
    background-color: #d0e6ff !important;
    border-radius: 4px;
    font-weight: 600;
}

/* File rows */
.wpfm-file-row {
    padding: 2px;
    border-bottom: 1px solid #eee;
}

/* Highlight the file currently being previewed */
.wpfm-file-selected {
    background-color: #e6f2ff !important;   /* light blue */
    border-left: 4px solid #0073aa !important; /* WP blue */
}

.wpfm-root {
    font-weight: bold;
}

/* Header */
#wpfm-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Remove footer height so plugin can reach bottom */
.site-footer {
    display: none !important;
}

/* Admin-only: stack folder controls vertically */
#wpfm-folder-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

/* New folder name textbox */
#wpfm-new-folder-name {
    width: 250px;
    padding: 6px;
    border: 1px solid #cccccc;
    border-radius: 3px;
}

/* Create Folder button (green) */
#wpfm-create-folder {
    background: #28a745;
    color: #ffffff;
    padding: 8px 14px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 150px;
    text-align: left;
}

.wpfm-toggle {
    color: #0073aa;
    font-size: 14px;      /* was 12px */
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.wpfm-collapsed > ul {
    display: none;
}

#wpfm-create-folder:hover {
    background: #005f8d;      /* darker blue */
}

/* Delete Folder button (red) */
#wpfm-delete-folder {
    background: #dc3545;
    color: #ffffff;
    padding: 8px 14px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 150px;
    text-align: left;
}

#wpfm-delete-folder:hover {
    background: #c82333;
}

/* NEW: depth-based indent only on the name */
.wpfm-folder-name {
    /* padding-left: calc(var(--wpfm-depth, 0) * 20px);*/
    display: inline-block;
}    

/* Stack folder action buttons vertically */
#wpfm-folder-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
}

#wpfm-rename-folder:hover {
    background: #005f8d;      /* darker blue */
}

/* Rename Folder button (blue) */
#wpfm-rename-folder {
    background: #0073aa;      /* WP blue */
    color: #ffffff;
    padding: 8px 14px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 150px;
    text-align: left;
}

.wpfm-quit-btn {
    background: #0073aa;
    color: #ffffff;
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 4px 0;
    width: 120px;
    text-align: left;
}

.wpfm-quit-btn:hover {
    background: #006799;
}