/* ============================================================
   FILE SHARING MODULE — Styles
   ============================================================ */

/* ── Add Files Modal ── */

.add-files-modal {
    min-height: 400px;
}

.add-files-tabs {
    display: flex;
    border-bottom: 2px solid #e8ecf1;
    margin-bottom: 16px;
}

.add-files-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #7f8c9b;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    user-select: none;
}

.add-files-tab:hover {
    color: #2c3e50;
}

.add-files-tab.active {
    color: #5B8DEF;
    border-bottom-color: #5B8DEF;
}

.add-files-tab .fas {
    margin-right: 6px;
}

/* Upload dropzone */
.upload-dropzone {
    border: 2px dashed #d1d9e6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #7f8c9b;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: #5B8DEF;
    background: #f0f5ff;
    color: #5B8DEF;
}

.upload-dropzone .fa-3x {
    margin-bottom: 12px;
    opacity: 0.5;
}

.upload-dropzone p {
    margin: 0;
    font-size: 14px;
}

.upload-browse-label {
    color: #5B8DEF;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

/* Upload file list */
.upload-file-list {
    margin-top: 12px;
}

.upload-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f5;
    gap: 12px;
}

.upload-file-info {
    flex: 1;
    min-width: 0;
}

.upload-file-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-file-size {
    font-size: 11px;
    color: #7f8c9b;
    margin-top: 2px;
}

.upload-progress {
    width: 120px;
    height: 6px;
    background: #e8ecf1;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.upload-progress-fill {
    height: 100%;
    background: #5B8DEF;
    border-radius: 3px;
    transition: width 0.2s;
    width: 0;
}

.upload-pct {
    width: 36px;
    text-align: right;
    font-size: 11px;
    color: #7f8c9b;
    flex-shrink: 0;
}

.upload-status {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.upload-status.done {
    color: #27ae60;
}

.upload-status.error {
    color: #e74c3c;
}

/* ── Project File Picker ── */

.project-file-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.project-file-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
}

.project-file-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #eef1f5;
}

.project-file-row:last-child {
    border-bottom: none;
}

.project-file-row:hover {
    background: #f8f9fb;
}

.project-file-row.selected {
    background: #eef3ff;
}

.pf-check {
    width: 28px;
    flex-shrink: 0;
}

.pf-check input[type=checkbox] {
    margin: 0;
    cursor: pointer;
}

.pf-info {
    flex: 1;
    min-width: 0;
}

.pf-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-meta {
    font-size: 11px;
    color: #7f8c9b;
    margin-top: 2px;
}

/* ── CProject File Shares Panel ── */

.file-shares-panel .panel-header-actions {
    margin-bottom: 12px;
    text-align: right;
}

.file-shares-panel .shares-table {
    font-size: 13px;
}

.file-shares-panel .shares-table th {
    font-size: 11px;
    text-transform: uppercase;
    color: #7f8c9b;
    font-weight: 600;
    border-bottom: 2px solid #e8ecf1;
}

.file-shares-panel .share-row {
    cursor: pointer;
    transition: background 0.1s;
}

.file-shares-panel .share-row:hover {
    background: #f8f9fb;
}

.file-shares-panel .share-name {
    font-weight: 500;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-shares-panel .no-data {
    padding: 24px;
    text-align: center;
    color: #7f8c9b;
    font-size: 13px;
}

.file-shares-panel .loading-indicator {
    padding: 24px;
    text-align: center;
    color: #7f8c9b;
}

/* Label overrides for share badges */
.file-shares-panel .label-info {
    background: #5B8DEF;
}

.file-shares-panel .label-success {
    background: #27ae60;
}

.file-shares-panel .label-warning {
    background: #e67e22;
    color: #fff;
}

.file-shares-panel .label-danger {
    background: #e74c3c;
}

.file-shares-panel .btn-copy-link {
    opacity: 0.6;
    transition: opacity 0.15s;
}

.file-shares-panel .btn-copy-link:hover {
    opacity: 1;
}
