/* components.css - Combined Component-Specific Styles */

/* =========================
   UPLOAD AREA STYLES
   ========================= */
.upload-area {
    border: 2px dashed var(--bs-primary);
    border-radius: 10px;
    padding: 50px;
    text-align: center;
    background-color: var(--bs-body-bg);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--bs-primary);
    background-color: var(--bs-secondary-bg);
    filter: brightness(0.95);
}

.upload-area.dragover {
    border-color: var(--bs-success);
    background-color: var(--bs-success-bg-subtle);
    transform: scale(1.02);
}

.upload-area.file-selected {
    border-color: var(--bs-success);
    background-color: var(--bs-success-bg-subtle);
}

.upload-area.dragover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--bs-success-rgb), 0.1);
    border-radius: 8px;
    z-index: 1;
}

/* =========================
   FILE LIST COMPONENT
   ========================= */
.file-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}

.file-item {
    padding: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item .filename {
    flex-grow: 1;
    font-size: 0.9rem;
    color: var(--bs-body-color);
    margin-right: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.file-item .file-size {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-right: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================
   OVERFLOW HANDLING
   ========================= */
.min-w-0 {
    min-width: 0 !important;
}

.text-truncate-enhanced {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* =========================
   DOCUMENT CARD HOVER EFFECTS
   ========================= */
.document-card {
    transition: background-color 0.2s ease, 
                border-left 0.2s ease, 
                box-shadow 0.2s ease;
    position: relative;
}

.document-card:hover {
    background-color: var(--bs-secondary-bg) !important;
    border-left: 4px solid var(--bs-primary) !important;
    padding-left: calc(1rem - 4px) !important;
    box-shadow: var(--bs-box-shadow) !important;
}

/* =========================
   ANIMATION KEYFRAMES
   ========================= */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

#fileSelected:not(.d-none) {
    animation: fadeIn 0.3s ease-out;
}

/* =========================
   BUTTON RESPONSIVE TEXT
   ========================= */
.action-btn .btn-text {
    display: inline;
}

/* =========================
   TEAM MEMBER AVATARS
   ========================= */
.avatar-sm {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.75rem;
}

.avatar-md {
    width: 40px !important;
    height: 40px !important;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 50px !important;
    height: 50px !important;
    font-size: 1rem;
}

/* =========================
   TIMELINE STYLING
   ========================= */
.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: -20px;
    width: 2px;
    background-color: var(--bs-border-color);
}

.timeline-item:last-child::before {
    display: none;
}

/* =========================
   TEAM STATS CARDS
   ========================= */
.team-stats-card {
    transition: transform 0.2s ease-in-out;
}

.team-stats-card:hover {
    transform: translateY(-2px);
}

/* =========================
   MEMBER LIST STYLING
   ========================= */
.member-list-item {
    transition: background-color 0.15s ease-in-out;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.member-list-item:hover {
    background-color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .member-list-item:hover {
    background-color: var(--bs-dark) !important;
}

/* =========================
   TEAM ACTIONS
   ========================= */
.team-action-btn {
    transition: all 0.15s ease-in-out;
}

.team-action-btn:hover {
    transform: scale(1.02);
}

/* =========================
   BULK ACTIONS BAR
   ========================= */
.bulk-actions-bar {
    background-color: var(--bs-primary-bg-subtle);
    border: 1px solid var(--bs-primary-border-subtle);
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}

/* =========================
   INVITATION STATUS INDICATORS
   ========================= */
.invitation-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.invitation-status.pending {
    background-color: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
    border: 1px solid var(--bs-warning-border-subtle);
}

.invitation-status.accepted {
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
    border: 1px solid var(--bs-success-border-subtle);
}

.invitation-status.expired {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
    border: 1px solid var(--bs-danger-border-subtle);
}

/* =========================
   RESPONSIVE ADJUSTMENTS
   ========================= */
@media (max-width: 767.98px) {
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline-item::before {
        left: 15px;
    }
    
    .avatar-md {
        width: 36px !important;
        height: 36px !important;
    }
    
    .member-list-item {
        padding: 0.5rem;
    }
}

/* =========================
   TEAM SETTINGS TABS
   ========================= */
.team-settings-nav .nav-link {
    color: var(--bs-body-color);
    border: 1px solid transparent;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.team-settings-nav .nav-link:hover {
    background-color: var(--bs-tertiary-bg);
}

.team-settings-nav .nav-link.active {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* =========================
   DARK MODE ADJUSTMENTS
   ========================= */
[data-bs-theme="dark"] .timeline-item::before {
    background-color: var(--bs-gray-600);
}

[data-bs-theme="dark"] .team-stats-card {
    border-color: var(--bs-gray-600);
}

[data-bs-theme="dark"] .bulk-actions-bar {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-600);
}