/* =============================================================================
   Mingo - deals.css
   Brand deal pipeline, kanban board, deal cards, content pipeline
   ============================================================================= */

/* =============================================================================
   Brand Collaboration Pipeline Styles
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Pipeline Board Layout
   ----------------------------------------------------------------------------- */
   .pipeline-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.pipeline-column {
    background: var(--surface-secondary);
    border-radius: var(--radius-lg);
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.pipeline-column-header {
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pipeline-column-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.pipeline-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pipeline-column-content {
    padding: 1rem;
    min-height: 400px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-pipeline-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.875rem;
}

/* -----------------------------------------------------------------------------
   Deal Cards
   ----------------------------------------------------------------------------- */
.deal-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: move;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.deal-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.deal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.deal-card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.paid-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-card-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.deal-card-deliverables {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.deal-card-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.deal-file-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.deal-ready-badge {
    background: var(--success-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.deal-card-due {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.deal-card-due.overdue {
    color: var(--danger-color);
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   Content Pipeline (Inside Modal)
   ----------------------------------------------------------------------------- */
.content-pipeline-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.content-pipeline-column {
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.content-pipeline-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-pipeline-header h5 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.content-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.content-pipeline-drop-zone {
    padding: 1rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-content-stage {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.875rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* -----------------------------------------------------------------------------
   Content File Cards (Inside Pipeline)
   ----------------------------------------------------------------------------- */
.content-file-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    cursor: move;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-file-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.content-file-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.content-file-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-file-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   Mobile Responsiveness
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .pipeline-board {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pipeline-column {
        min-width: 100%;
    }
    
    .pipeline-column-content {
        min-height: 200px;
    }
    
    .content-pipeline-board {
        grid-template-columns: 1fr;
    }
    
    .content-pipeline-drop-zone {
        min-height: 200px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .pipeline-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-pipeline-board {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   Link Existing Files Modal Styles
   ============================================================================= */

/* Linkable Files Grid */
#linkableFilesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.linkable-file-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.linkable-file-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
    transform: translateY(-2px);
}

.linkable-file-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.linkable-file-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
}

.linkable-file-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* NEW: Thumbnail wrapper and image styles */
.linkable-file-thumbnail-wrapper {
    width: 100%;
    height: 100px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--surface-secondary);
}

.linkable-file-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.linkable-file-icon-large {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
    background: var(--surface-secondary);
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

.linkable-file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.linkable-file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.file-folder-tag {
    background: var(--surface-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.linked-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.file-preview-thumb {
    width: 100%;
    height: 100px;
    background: var(--surface-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 1rem;
    position: relative;
}

/* Selected Files Count */
#selectedFilesCount {
    font-size: 0.875rem;
}

/* Small Button Style */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Modern styled inputs for Link Existing Files Modal */
#linkFilesSearch,
#linkFilesFilter,
#linkFilesPipelineStage {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

#linkFilesSearch:focus,
#linkFilesFilter:focus,
#linkFilesPipelineStage:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#linkFilesSearch::placeholder {
    color: var(--text-muted);
}

#linkFilesFilter,
#linkFilesPipelineStage {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Style the label for pipeline stage */
.modal-body label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #linkableFilesGrid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .linkable-file-thumbnail-wrapper,
    .linkable-file-icon-large {
        height: 80px;
    }
    
    .linkable-file-name {
        font-size: 0.75rem;
    }
}