/* bx_cloud - Cloud Module Styles */

.bx-cloud-wrap,
.bx-cloud-profile-wrap {
    position: relative;
    padding: 10px;
}

/* Toolbar */
.bx-cloud-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.bx-cloud-title {
    margin: 0;
    font-size: 1.2em;
}

/* Album tabs */
.bx-cloud-albums-bar {
    margin-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}
.bx-cloud-album-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.bx-cloud-album-tab {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    background: #f7f7f7;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bx-cloud-album-tab.active {
    background: #fff;
    border-bottom-color: #fff;
    font-weight: bold;
}
.bx-cloud-album-del {
    color: #999;
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
}
.bx-cloud-album-del:hover {
    color: #c00;
}

/* Items grid */
.bx-cloud-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.bx-cloud-item {
    width: 140px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    cursor: grab;
    position: relative;
    transition: box-shadow .15s;
}
.bx-cloud-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.bx-cloud-item-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
    background: #eee;
}
.bx-cloud-item-icon {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: #999;
    background: #f0f0f0;
}
.bx-cloud-item-footer {
    padding: 5px 6px;
    font-size: 0.78em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bx-cloud-item-actions {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    gap: 4px;
    flex-direction: column;
}
.bx-cloud-item:hover .bx-cloud-item-actions {
    display: flex;
}
.bx-cloud-item-btn {
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 0.75em;
    cursor: pointer;
    white-space: nowrap;
}
.bx-cloud-item-btn:hover {
    background: rgba(0,0,0,.8);
}
.bx-cloud-item.sortable-ghost {
    opacity: .4;
}

/* Empty */
.bx-cloud-empty {
    color: #888;
    padding: 20px;
    text-align: center;
    font-style: italic;
}

/* Modals */
.bx-cloud-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bx-cloud-modal-inner {
    background: #fff;
    border-radius: 8px;
    min-width: 320px;
    max-width: 480px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.bx-cloud-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}
.bx-cloud-modal-close {
    background: none;
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    color: #888;
    line-height: 1;
}
.bx-cloud-modal-body {
    padding: 16px;
}
.bx-cloud-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Share targets */
.bx-cloud-share-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.bx-cloud-share-target-btn {
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    background: #f7f7f7;
    font-size: 0.9em;
    transition: border-color .15s, background .15s;
}
.bx-cloud-share-target-btn.selected {
    border-color: #007bff;
    background: #e8f0fe;
}
.bx-cloud-share-context {
    margin-top: 8px;
}
.bx-cloud-share-context select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Add to Cloud button (injected near share buttons) */
.bx-cloud-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 0.85em;
    color: #333;
    transition: background .15s;
    user-select: none;
    margin-left: 6px;
}
.bx-cloud-add-btn:hover {
    background: #e0e0e0;
}
.bx-cloud-add-btn.added {
    color: #2a7a2a;
    border-color: #2a7a2a;
    background: #eaffea;
}

/* Migration block */
.bx-cloud-migration-wrap {
    padding: 10px;
}
.bx-cloud-migration-result {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    background: #eaffea;
    color: #2a7a2a;
}

/* External share links are removed via BxCloudShare (BxDolShare override), not CSS. */

/* Profile cloud view */
.bx-cloud-items-profile .bx-cloud-item {
    width: 110px;
}
.bx-cloud-items-profile .bx-cloud-item-thumb,
.bx-cloud-items-profile .bx-cloud-item-icon {
    height: 80px;
}
