/**
 * Teams View Styles
 */

.teams-view-container {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 1rem 6rem;
  max-width: 640px;
  margin: 0 auto;
}

.teams-view-container.active {
  display: flex;
}

.teams-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.teams-loading .spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid #e2e8f0;
  border-top-color: #135bec;
  border-radius: 50%;
  animation: dashboard-spin 0.8s linear infinite;
}

.teams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.teams-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tw-slate-900, #0f172a);
}

.dark .teams-header h1 {
  color: #f1f5f9;
}

.teams-header-detail {
  gap: 0.5rem;
}

.teams-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  color: #64748b;
}

.teams-back-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dark .teams-back-btn:hover {
  background: #334155;
  color: #f1f5f9;
}

.teams-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: #135bec;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.teams-create-btn:hover {
  background: #0d47c7;
}

.teams-create-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.teams-create-form.hidden {
  display: none;
}

.teams-input {
  flex: 1;
  min-width: 140px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: white;
}

.dark .teams-input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.teams-select {
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: white;
}

.dark .teams-select {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.teams-create-submit,
.teams-add-btn {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: #135bec;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.teams-create-submit:hover,
.teams-add-btn:hover {
  background: #0d47c7;
}

.teams-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.teams-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.teams-item:hover {
  background: #f8fafc;
}

.dark .teams-item {
  background: #1e293b;
  border-color: #334155;
}

.dark .teams-item:hover {
  background: #334155;
}

.teams-item-name {
  font-weight: 500;
  color: #0f172a;
}

.dark .teams-item-name {
  color: #f1f5f9;
}

.teams-item-role {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: capitalize;
}

.teams-empty {
  padding: 1.5rem;
  text-align: center;
  color: #64748b;
}

.dark .teams-empty {
  color: #94a3b8;
}

.teams-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
}

.dark .teams-section {
  background: #1e293b;
  border-color: #334155;
}

.teams-section-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.dark .teams-section-header {
  color: #f1f5f9;
}

.teams-members-list,
.teams-conv-list,
.teams-conflicts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.teams-member {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.teams-member-role {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: capitalize;
}

.teams-member-aliases {
  font-size: 0.75rem;
  color: #94a3b8;
}

.teams-add-member,
.teams-add-alias {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.teams-add-alias label {
  font-size: 0.8125rem;
  color: #64748b;
  width: 100%;
}

.teams-empty-inline {
  font-size: 0.875rem;
  color: #94a3b8;
}

.teams-conv-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: #f8fafc;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}

.teams-conv-item:hover {
  background: #e2e8f0;
}

.dark .teams-conv-item {
  background: #334155;
}

.dark .teams-conv-item:hover {
  background: #475569;
}

.teams-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #135bec;
  background: rgba(19, 91, 236, 0.1);
  border: 1px solid rgba(19, 91, 236, 0.3);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.teams-share-btn:hover {
  background: rgba(19, 91, 236, 0.2);
}

.teams-conflict-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.teams-conflict-item {
  font-size: 0.8125rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.dark .teams-conflict-item {
  border-color: #334155;
}

/* Workspace */
.teams-workspace-hint,
.teams-report-hint,
.teams-opp-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.teams-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: white;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.dark .teams-textarea {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.teams-workspace-desc {
  font-size: 0.875rem;
  color: #475569;
}

.teams-save-workspace-btn {
  margin-top: 0.25rem;
}

/* Report */
.teams-report-summary {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.teams-unassigned {
  color: #dc2626;
}

.teams-report-by-owner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.teams-report-owner {
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.dark .teams-report-owner {
  background: #334155;
}

.teams-report-owner-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.teams-report-items {
  font-size: 0.8125rem;
  color: #64748b;
}

/* Opportunities */
.teams-opp-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.teams-opp-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.dark .teams-opp-item {
  background: #334155;
}

.teams-opp-title {
  flex: 1;
  font-weight: 500;
}

.teams-opp-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.teams-opp-comment-btn,
.teams-conv-comment-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.7;
}

.teams-opp-comment-btn:hover,
.teams-conv-comment-btn:hover {
  opacity: 1;
}

.teams-conv-text {
  flex: 1;
}

.teams-add-opp {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Comments modal */
.teams-comments-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.teams-comments-modal {
  background: white;
  border-radius: 0.75rem;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dark .teams-comments-modal {
  background: #1e293b;
}

.teams-comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.dark .teams-comments-header {
  border-color: #334155;
}

.teams-comments-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.teams-comments-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

.teams-comments-list {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.teams-comment-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

.dark .teams-comment-item {
  border-color: #334155;
}

.teams-comment-author {
  font-weight: 600;
  margin-right: 0.5rem;
}

.teams-comment-date {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
  margin-top: 0.25rem;
}

.teams-comments-add {
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
}

.dark .teams-comments-add {
  border-color: #334155;
}
