html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Canvas area (Go app) */

#main {
    flex: 1;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ---- Bucket modal ---- */

.hidden {
    display: none !important;
}

.bucket-modal {
    position: fixed;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    z-index: 9999;
    /* ensure on top of Go app */
    display: flex;
    align-items: center;
    justify-content: center;
}

.bucket-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.bucket-dialog {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    width: 700px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    padding: 8px 10px 10px 10px;
    display: flex;
    flex-direction: column;
    z-index: 1;
    /* above backdrop */
    font-size: 13px;
}

.bucket-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#bucket-current-path {
    font-size: 12px;
    color: #666;
}

.bucket-open {
    border: 1px solid #ccc;
    background: #f4f4f4;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 12px;
}

.bucket-open:hover {
    background: #e9e9e9;
}

.bucket-row-selected {
    background: #d7ebff !important;
}

.bucket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.bucket-loading-message {
    padding: 1rem;
    font-style: italic;
    opacity: 0.8;
}

.bucket-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

#bucket-status {
    color: #555;
    font-size: 12px;
}

.bucket-close {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}

.bucket-close:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.bucket-table-wrapper {
    overflow: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.bucket-dialog table {
    border-collapse: collapse;
    width: 100%;
}

.bucket-dialog th,
.bucket-dialog td {
    padding: 4px 6px;
    border-bottom: 1px solid #f0f0f0;
}

.bucket-dialog tr:hover {
    background: #f5f5f5;
}

.col-size {
    width: 90px;
}

.col-actions {
    width: 120px;
}