/* Workspace Specific Styles */
.workspace-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.workspace-header {
    background: white;
    padding: 2rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.workspace-info h1 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.workspace-info p {
    color: #666;
    margin-bottom: 1rem;
}

.workspace-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #999;
}

.workspace-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.online-members {
    display: flex;
    align-items: center;
}

.online-member {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: -8px;
    border: 2px solid white;
    position: relative;
}

.online-member:first-child {
    margin-left: 0;
}

.online-member::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    border: 2px solid white;
}

/* Workspace Layout */
.workspace-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    min-height: calc(100vh - 200px);
}

.workspace-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #f0f0f0;
    padding: 1.5rem;
}

.workspace-sidebar.right-sidebar {
    border-right: none;
    border-left: 1px solid #f0f0f0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.member-item:hover {
    background: white;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.member-role {
    font-size: 0.8rem;
    color: #999;
    text-transform: capitalize;
}

.member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
}

.member-status.offline {
    background: #bdc3c7;
}

/* Chat Styles */
.chat-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f8f9fa;
}

.chat-message.own {
    background: var(--light);
    margin-left: 2rem;
}

.message-sender {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.message-text {
    font-size: 0.9rem;
    color: #333;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    text-align: right;
    margin-top: 0.25rem;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
}

.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 0.5rem;
}

/* Main Content */
.workspace-main {
    padding: 1.5rem;
    background: white;
    position: relative;
}

.palettes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.palettes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Comments Panel */
.comments-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    border-left: 1px solid #f0f0f0;
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.comments-panel.active {
    right: 0;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.close-comments {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.comments-list {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.comment-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.comment-text {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.comment-time {
    font-size: 0.8rem;
    color: #999;
}

.comment-input {
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
}

.comment-input textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 0.5rem;
}

/* Version History */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.version-item {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.version-item:hover {
    border-color: var(--primary);
}

.version-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.version-meta {
    font-size: 0.8rem;
    color: #999;
}

.version-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.timeline-content {
    flex: 1;
}

.timeline-palette {
    display: flex;
    height: 40px;
    margin-top: 0.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.timeline-color {
    flex: 1;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item.small {
    padding: 0.5rem;
    border: none;
}

.activity-item.small .activity-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.7rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .workspace-layout {
        grid-template-columns: 250px 1fr;
    }
    
    .workspace-sidebar.right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .workspace-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .workspace-layout {
        grid-template-columns: 1fr;
    }
    
    .workspace-sidebar {
        display: none;
    }
    
    .palettes-container {
        grid-template-columns: 1fr;
    }
    
    .comments-panel {
        width: 100%;
        right: -100%;
    }
}