/**
 * Sprint 5: CSS Styles - Kollaborations-Features
 * 
 * @package 5meter-todo-system
 * @version 1.3.0
 */

/* ============================================
   COMMENTS SECTION
   ============================================ */

.fmts-comments-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fmts-comment-input-wrapper {
    position: relative;
}

#fmts-comment-input {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

#fmts-comment-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fmts-comment {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.fmts-comment:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fmts-comment-content {
    color: #4b5563;
    line-height: 1.6;
    word-wrap: break-word;
}

.fmts-comment-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
}

.fmts-comment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.fmts-comment-actions button:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Mentions Autocomplete */
.mention-suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.mention-suggestion:hover {
    background: #f0f9ff;
}

.mention-suggestion:last-child {
    border-bottom: none;
}

/* ============================================
   FILE ATTACHMENTS SECTION
   ============================================ */

.fmts-attachments-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fmts-file-upload {
    background: #f9fafb;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.fmts-file-upload:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.fmts-attachment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.fmts-attachment:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ============================================
   FOLLOWERS SECTION
   ============================================ */

.fmts-followers-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#fmts-follow-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: white;
}

#fmts-follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#fmts-follow-btn:active {
    transform: translateY(0);
}

#fmts-follower-count {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    color: #666;
    font-weight: 600;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */

.fmts-activity-feed {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fmts-activity-timeline {
    position: relative;
    padding-left: 30px;
}

.fmts-activity-item {
    position: relative;
    padding-bottom: 20px;
}

.fmts-activity-item:last-child {
    padding-bottom: 0;
}

.fmts-activity-item:last-child > div:last-child {
    display: none; /* Hide line for last item */
}

/* Dashboard Activity Widget */
.fmts-dashboard-activity {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fmts-activity-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.fmts-activity-compact:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ============================================
   BUTTONS
   ============================================ */

.fmts-btn-primary {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.fmts-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.fmts-btn-primary:active {
    transform: translateY(0);
}

.fmts-btn-success {
    padding: 10px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.fmts-btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.fmts-btn-danger {
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
}

.fmts-btn-danger:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .fmts-comments-section,
    .fmts-attachments-section,
    .fmts-followers-section,
    .fmts-activity-feed {
        padding: 15px;
    }
    
    .fmts-comment {
        flex-direction: column;
        gap: 10px;
    }
    
    #fmts-comment-input {
        min-height: 80px;
        font-size: 16px; /* iOS zoom prevention */
    }
    
    .fmts-activity-timeline {
        padding-left: 20px;
    }
    
    .fmts-btn-primary,
    .fmts-btn-success {
        width: 100%;
        margin-top: 10px;
    }
}

/* ============================================
   DARK MODE SUPPORT (optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .fmts-comments-section,
    .fmts-attachments-section,
    .fmts-followers-section,
    .fmts-activity-feed,
    .fmts-dashboard-activity {
        background: #1e293b;
        color: #e2e8f0;
    }
    
    .fmts-comment,
    .fmts-attachment,
    .fmts-activity-compact {
        background: #334155;
    }
    
    #fmts-comment-input {
        background: #334155;
        color: #e2e8f0;
        border-color: #475569;
    }
    
    .fmts-file-upload {
        background: #334155;
        border-color: #475569;
    }
}

/* ============================================
   LOADING STATES
   ============================================ */

.fmts-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

button:focus,
textarea:focus,
input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
