@import './meeting-tokens';

.mt-detail {
  display: flex;
  flex-direction: column;
  font-family: $mt-font;
  width: min(860px, 92vw);
  height: min(700px, 88vh);
}

.mt-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid $mt-border;
}

.mt-detail-heading {
  display: flex;
  align-items: center;
  gap: 12px;

  h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    color: $mt-ink;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: $mt-ink-muted;
  cursor: pointer;
  flex-shrink: 0;

  &:hover {
    background: $mt-surface-muted;
    color: $mt-ink;
  }
}

.mt-detail-loading {
  padding: 40px;
  text-align: center;
  color: $mt-ink-muted;
}

.mt-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  background: $mt-status-scheduled-bg;
  color: $mt-status-scheduled;

  &.completed {
    background: $mt-status-completed-bg;
    color: $mt-status-completed;
  }

  &.cancelled {
    background: $mt-status-cancelled-bg;
    color: $mt-status-cancelled;
  }
}

.mt-tabs {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;

  ::ng-deep .mat-mdc-tab-body-wrapper {
    flex: 1;
    min-height: 0;
  }

  ::ng-deep .mdc-tab__text-label {
    color: $mt-ink-muted;
    font-weight: 600;
  }

  ::ng-deep .mdc-tab-indicator__content--underline {
    border-color: $mt-accent !important;
  }
}

.mt-details-panel,
.mt-recording-panel {
  padding: 18px 24px;
  height: 100%;
  overflow-y: auto;
}

.mt-detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.mt-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 24px;
  margin: 0 0 22px;

  dt {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: $mt-ink-muted;
    margin-bottom: 3px;
  }

  dd {
    margin: 0;
    font-size: 14px;
    color: $mt-ink;

    a {
      color: $mt-accent;
    }
  }
}

.mt-participants-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mt-section-title {
  font-size: 13px;
  font-weight: 700;
  color: $mt-ink-muted;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mt-add-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.field-input {
  font-family: $mt-font;
  font-size: 14px;
  color: $mt-ink;
  padding: 8px 10px;
  border: 1px solid $mt-border;
  border-radius: 8px;
  background: $mt-surface;
}

.mt-participant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mt-participant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid $mt-border;
  border-radius: 8px;
}

.mt-participant-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: $mt-accent-light;
  color: $mt-accent-dark;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.mt-participant-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: $mt-ink;
}

.mt-attendance-select {
  min-width: 120px;
}

.mt-minutes-panel {
  height: 100%;
  padding: 12px 24px 20px;
  display: flex;
}

.mt-recordings-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mt-recording-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid $mt-border;
  border-radius: 8px;

  mat-icon {
    color: $mt-accent;
  }
}

.mt-recording-summary {
  flex: 1;
  margin: 0;
  font-size: 13px;
  color: $mt-ink-muted;
}

.btn {
  font-family: $mt-font;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: $mt-accent;
  color: white;

  &:hover {
    background: $mt-accent-dark;
  }
}

.btn-ghost {
  background: transparent;
  color: $mt-ink-muted;

  &:hover {
    background: $mt-surface-muted;
  }

  &.danger {
    color: #b91c1c;

    &:hover {
      background: #fef2f2;
    }
  }
}

.btn-sm {
  font-size: 13px;
  padding: 7px 14px;

  mat-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }
}
